opencl works, but tons of kernels
MODIFY
accel/opencl/ops_opencl.py
accel/opencl/ops_opencl.py
@@ -105,7 +105,7 @@ class OpenCLBuffer(GPUBuffer):
int W = get_image_width(out);
write_imagef(out, l, in[l.y*W + l.x]);
}
- """)(self._image.shape, None, self._buf, self._image)
+ """)(self._image.shape, None, self._buf.cl, self._image)
self._buf = None
return self._image

MODIFY
tinygrad/mlops.py
tinygrad/mlops.py
@@ -158,7 +158,6 @@ class Flip(Function):
class Conv2D(Function):
def _conv(ctx, x, w, C):
# TODO: this does NOT belong here
- # was pre/post processing for opencl
if x.device == "OPENCL":
from accel.opencl.preprocessing import processed_conv
return processed_conv(x, w, C)

opencl works, but tons of kernels