-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable image and buffer data interoperability #57
Comments
After a bit of investigation I think the issues is related to the coordinate coding which in the current defines is
The last case is not treated because for buffer we only use the To be tested (and hoping it doesn't need more ...). EDIT: apparently it's not that simple :/ #define CONVERT_dst_PIXEL_TYPE clij_convert_float_sat
#define IMAGE_dst_PIXEL_TYPE float
#define POS_dst_TYPE int
#define POS_dst_INSTANCE(pos0,pos1,pos2,pos3) (int)(pos0)
#define IMAGE_dst_TYPE __write_only image1d_t
#define READ_dst_IMAGE(a,b,c) read_imagef(a,b,c)
#define WRITE_dst_IMAGE(a,b,c) write_imagef(a,b,c)
#define IMAGE_SIZE_dst_WIDTH 10
#define IMAGE_SIZE_dst_HEIGHT 1
#define IMAGE_SIZE_dst_DEPTH 1
#define CONVERT_src_PIXEL_TYPE clij_convert_float_sat
#define IMAGE_src_PIXEL_TYPE float
#define POS_src_TYPE int
#define POS_src_INSTANCE(pos0,pos1,pos2,pos3) (int)(pos0)
#define IMAGE_src_TYPE __read_only image1d_t
#define READ_src_IMAGE(a,b,c) read_imagef(a,b,c)
#define WRITE_src_IMAGE(a,b,c) write_imagef(a,b,c)
#define IMAGE_SIZE_src_WIDTH 10
#define IMAGE_SIZE_src_HEIGHT 1
#define IMAGE_SIZE_src_DEPTH 1 errors:
|
So, to follow up on this. It find a read function for
This is due to the kernel const int2 pos = (int2){x,y}; Same but with Hence, we face an incompatibility issue from CLIJ kernel to image1d_t. To be discussed if there is a work around or not 🙃 EDIT: const int2 pos = (int2){x,y}; with const int pos = (int){x}; Solve the issue, kernel is executing properly with image1d_t Still need to test if this solves the issue of running a kernel with dimension reduction (e.g. MaximumOfAllPIxelsKernel) EDIT2: Spoiler alert .... it works with MaximumOfAllPixelsKernel! |
So, to finish this thread, to allows In generating
|
The merging of the branch #ocl_buffer_image_interoperability which is solving this issue is directly linked to the resolution of issues #11 and #15 from CLIJ kernel repository. |
#65 is solving the issue by introducing an Kernels will take as input and output an The memory type is to be precised when calling create or push, default being Buffer. |
Current preamble does not support cl_image1d even though the function read_image1d and write_image1d are provided by OpenCL.
I mainly suspect an issue with the coordinate system of CLIJ that is always defined as a 2d coord
(x,y)
withy=0
in case of 1d.it does, however, seems to support
cl_image2d
with 1d shape. Current fix would be to only implementcl_image3d
andcl_image2d
. And manage 1d and 2d withcl_image2d
.Though I assume a possible efficiency or results impact when applying very specific image operation? Need to be tested.
EDIT: Only implementing
cl_image3d
for managing all dimension compile and execute but return wrong output for 1d data.Sources and log for information purposes (@haesleinhuepf if you wanna decrypt this).
#defines
error log
The text was updated successfully, but these errors were encountered: