Hi everyone !!
I have the following problem:
I have a CUDA code that uses texture, for example:
texture<unsigned char, 2, cudaReadModeElementType> text; unsigned char a = tex2D(text, cx + lx, cy);
So when I use DPCT, I have this output:
/* DPCT1059:12: SYCL only supports 4-channel image format. Adjust the code. */ dpct::image_wrapper<unsigned char, 2> text;
SO, I changed the declaration with this:
dpct::image_wrapper<sycl::uchar4, 2> text_wrp; And after launch kernel: dpct::image_accessor_ext<sycl::uchar4, 2> text
My problem is that I don't know how to create an equivalent when reading. I have this:
sycl::uchar4 a = text.read(cx + lx, cy);
But I don't know how to get the same unsigned char from CUDA in my DPC code. Do I have to modify the indexes on the read ? I'm really lost.
Thank you so much in advance !!
Thanks for reaching out to us.
Could you please provide us a sample reproducer of both CUDA, DPCPP so that we can work on it from our end.
And also please do let us know your environment details
OS & version
Thanks & Regards