Closed StRigaud closed 4 months ago
@haesleinhuepf
With #318, cl_image
is fully compatible on my M2, this include the interpolation. This will be available on the python side with the next release (soon).
That's super cool! And it might be an advantage over clij2 and pyclesperanto_prototype
Its possible that it is the same issue for the prototype and clij2 somewhere in the code?
Rigth now I am trying to make the CI skip tests over images because it does not support them. Once I manage, I will merge and make a release to have both chan-vese and affine transform operational
Test involving images are always skip.
To enable them for local test, one must comment GTEST_SKIP()
in the test code.
Its not great but will do for now
in OpenCL, the
cl_image
is defined by acl_image_format
composed ofcl_channel_order
andcl_channel_type
.cl_channel_type
: correspond to the data typefloat
,int8
etc,cl_channel_order
: correspond to the composition of the imageCL_RGB
for example.Clesperanto only manage single channel image, which point to the following
channel_order
:CL_R
,CL_A
,CL_INTENSITY
, orCL_LUMINANCE
.Eventhough they all represente a single channel image, their behaviour differe based on opencl version and hardware. Quick tests shows the following.
On my local NVIDIA card:
CL_A
return0
with CLIj frameworkCL_R
work with all and does not replicate the valuesCL_INTENSITY
work with all, but the value is replicated on the with channel RGBCL_LUMINANCE
work with all but the value is replicated on the with channel RGBOn my local M2 Apple:
CL_A
return0
with CLIj frameworkCL_R
work with all and does not replicate the valuesCL_INTENSITY
work only withCL_FLOAT
, and the value is replicated on the with channel RGBCL_LUMINANCE
is not supportedThis point toward the usage of the
CL_R
. I will set a PR to ensure maximum compatibility.Classic OpenCL error that could be related to this issue is
CL_IMAGE_FORMAT_NOT_SUPPORTED