-
Notifications
You must be signed in to change notification settings - Fork 769
[E2E][BINDLESS] Add ptr to ptr of image_handle test failing on level zero only #18721
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
base: sycl
Are you sure you want to change the base?
Conversation
Signed-off-by: JackAKirk <[email protected]>
Signed-off-by: JackAKirk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code makes sense, but it's difficult to understand what's going on, I've made some suggestions to help the reader. So if it's passing on CUDA but failing on L0 it might be an issue with either the L0 driver or with IGC.
} | ||
|
||
// Image descriptor - can use the same for both images | ||
sycl::ext::oneapi::experimental::image_descriptor desc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to use the syclexp
namespace alias everywhere instead of specifying the full namespace, to make the code clearer
sycl::ext::oneapi::experimental::image_descriptor desc( | |
syclexp::image_descriptor desc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks
sycl::ext::oneapi::experimental::unsampled_image_handle imgOut = | ||
sycl::ext::oneapi::experimental::create_image(imgMemoryOut, desc, q); | ||
|
||
void *imageHandlePtrGen = static_cast<void *>(sycl::malloc_device( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void *imageHandlePtrGen = static_cast<void *>(sycl::malloc_device( | |
void *imageHandlePtrGen = sycl::malloc_device( |
It's OK if we deviate from the original bug report a bit to make the test clearer, in this case malloc_device
returns void*
anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks
|
||
void *imageHandlePtrGen = static_cast<void *>(sycl::malloc_device( | ||
sizeof(sycl::ext::oneapi::experimental::unsampled_image_handle), q)); | ||
q.memcpy(static_cast<void *>(imageHandlePtrGen), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to add a short comment to each copy about what it's supposed to be doing. In this case we're copying the image handle from the host to an image handle on device. But it gets more complicated with the copies below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks
Signed-off-by: JackAKirk <[email protected]>
Signed-off-by: JackAKirk <[email protected]>
This test passes on the cuda backend but fails on level_zero. It allocates a single element array of
unsampled_image_handle*
, pointing to a validunsampled_image_handle
that is dereferenced on the device. The casting to genericvoid*
is not necessary to make the test fail on l0, but is done to keep this test matching the original bug report we received.Note that rewriting this test to make an identical dereference with for example a single 2d C array of
long
passes on level_zero, indicating that this issue is specific to image_handles.