-
Notifications
You must be signed in to change notification settings - Fork 803
[SYCL] Use correct units when specifying image offset and extent #19936
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?
[SYCL] Use correct units when specifying image offset and extent #19936
Conversation
// ur_rect_offset_t and ur_rect_region_t describe their first component as | ||
// bytes, whilst ze_image_region_t uses pixels. | ||
// | ||
// However, the getImageRegionHelper above is used for both bindless and regular |
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.
Note for UR reviewers: this inconsistency in the spec was reported as URT-969
Was this not covered by any test? Could we add one now? |
Yes and no. We do have tests for copies, but a lot of them UPD: to be precise, out of 6 bindless image copy tests, 4 have The change itself is |
…correct-units-in-bindless-image-copies
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.
Great catch! 🚀
impl->MDestOffset = {DestOffset[0], DestOffset[1], DestOffset[2]}; | ||
// Copy args computed here are directly passed to UR. Various offsets and | ||
// extents end up passed as ur_rect_offset_t and ur_rect_region_t. Both those | ||
// structs expect theirfirst component to be in bytes, not in pixels |
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.
// structs expect theirfirst component to be in bytes, not in pixels | |
// structs expect their first component to be in bytes, not in pixels |
@intel/unified-runtime-reviewers-level-zero, could you please take a look? I'm mostly looking for feedback about the new helper function that I'm introducing. I can't modify existing one, because there are other APIs which use it, but they expect the "old" The way of how the helper will be used isn't final, because |
urBindlessImagesImageCopyExp
documents its argument that describe copy region as usingbytes-pixel-pixel
format, while we were mistakenly passingpixel-pixel-pixel
format in there.This PR adjusts that. It is an
NFC
change for CUDA & HIP adapters, because for them it only changes the place where pixel to byte conversion happens, but the change is tricker for L0 adapter. In L0, there are APIs which expectpixel-pixel-pixel
format and there are APIs which acceptbytes-pixel-pixel
format, so some extra care is needed there.