-
Notifications
You must be signed in to change notification settings - Fork 797
[SYCL][UR][Bindless][Doc] Fix copy docs and implementation. #19093
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
[SYCL][UR][Bindless][Doc] Fix copy docs and implementation. #19093
Conversation
This patch fixes the implementation of bindless image copies. Previously, source and destination pitch values were not being set correctly. This patch also updates the wording around the requirements for `ext_oneapi_copy`. A missing requrement was added. Namely that the `CopyExtent` parameter in the `ext_oneapi_copy` functions that take it, must not have `0` values in any of the three dimensions. The requirements for `ext_oneapi_copy` have also been re-written to prescribe what the functions expect, instead of providing a list of cases in which the function may fail. This should hopefully make it clearer and more prescriptive, rather than saying the copy function may fail if some condition is not met, we now say that the function requires that certain conditions be met.
|
Ping @intel/llvm-reviewers-runtime @intel/unified-runtime-reviewers-level-zero |
|
Friendly ping @intel/llvm-reviewers-runtime @intel/unified-runtime-reviewers-level-zero |
|
Ping @intel/llvm-reviewers-runtime |
steffenlarsen
left a comment
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.
Overall I think it looks good, but could you please add some tests?
sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc
Outdated
Show resolved
Hide resolved
@steffenlarsen Would it be OK if we merged this now to capture the feature freeze? We can work on adding a test separately since that should be NFC. |
I am sorry to be the bad guy, but normal procedure would require functional changes to be tested. If this is a reasonable behavioral change then maybe it is still fine after feature freeze, but as it stands I cannot stand by an approval from a quality point-of-view. |
|
@przemektmalon - I wanted to help out today by writing some tests for this PR. Getting more familiar with the bindless images has been on my To-Do list for ages and it seemed like a sensible entrée. But AFAICT this PR is mostly just internal changes to If further testing is warranted it is probably to ensure that the updated docs match the changes in the implementation. Can you think of any easy way to test those with the normal bindless image I/O ? Or am I going to have to break modularity to conduct checks under @steffenlarsen - pinging you since this is in response to your request. |
|
Thanks for the analysis, @cperkinsintel. My main concern is that there are changes to the documented behavior and the changes are not considered NFC by the author. As such, there should be some observable difference in functional behavior, yet no tests needed to be changed and no tests were added. I am not necessarily concerned about new bugs as much as untested new functionality. Reading through the documentation changes again, I would focus on the fact that the |
|
Thanks @cperkinsintel for looking into this. While you are correct that the The reason I did not include tests in this PR to fill the gaps in the copy function coverage was to expedite getting these fixes in for the DPCT team. This also included the addition of an extra condition on the
The new condition added to I need to look back and see exactly which tests need to be expanded, but IIRC we need to ensure that every variant of sub-region copies are properly tested, which isn't the case right now. I.e. all of Host to Device, Device to Host, Device to Device are tested with sub-region copies, where the device memory can be either USM or
It should definitely be possible to extend the current sub-region copy tests using the normal Bindless Images copy APIs, without having to make any calls under
The only condition added to the As a bug-fix PR, this can still be cherry-picked after code freeze. I'm happy to look back at the gaps in |
|
Thank you for clarifying, @przemektmalon ! |
|
@steffenlarsen I've extended the sub-region copy testing coverage which should cover the few gaps we had in testing and prevent future regressions. |
steffenlarsen
left a comment
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.
Very nice! Thanks for adding tests. 🚀
|
@intel/llvm-gatekeepers This is ready to merge. |
This patch fixes the implementation of bindless image copies. Previously, source and destination pitch values were not being set correctly.
This patch also updates the wording around the requirements for
ext_oneapi_copy.A missing requirement was added to the specification. Namely that the
CopyExtentparameter in theext_oneapi_copyfunctions that take it, must not have0values in any of the three dimensions, they must be greater than or equal to1.The requirements for
ext_oneapi_copyhave also been re-written to prescribe what the functions expect, instead of providing a list of cases in which the function may fail. This should hopefully make it clearer and more prescriptive, rather than saying the copy function may fail if some condition is not met, we now say that the functions require that certain conditions be met.The coverage for sub-region copy testing has also been extended to prevent future regressions.