-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Allow USM ptrs in exclusive and inclusive scans #4310
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] Allow USM ptrs in exclusive and inclusive scans #4310
Conversation
@Pennycook , can you please comment? |
Functionality LGTM. Our implementation of |
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.
@Pennycook , can you please comment?
Functionality LGTM. Our implementation of
joint_reduce
already seems to accept pointers that aren'tmulti_ptr
s, so it makes sense to extend that toexclusive_scan
andinclusive_scan
.
should we "deduce" if the raw pointer is in global or local AS (for future performance optimizations)? Or this functionality assumes glocab AS?
Good question. I think we should explore this in a separate PR, because my hope is that this won't be necessary. The algorithms can work with any address space that all work-items in the group can see. (We don't currently have a group that represents a single work-item, but if we introduced that degenerate case, even So my expectation is:
I think we should only worry about adding our own run-time checks if the compiler is failing with the hoisting, and if we're certain that the compiler will then optimize away the run-time checks in the other cases. |
Thank you for the detailed explanation. It is clear now. |
The group algorithms are currently accepting only multi_ptrs while the SYCL spec (4.17.4) states that data ranges can be described using pointers, iterators or instances of the multi_ptr class. The spec allows to introduce additional restrictions, but now that this implementation supports USM should we still keep enforcing the use of multi_ptr ? The doc has no reference to the use of multi_ptr.