Skip to content

Conversation

@againull
Copy link
Contributor

@againull againull commented Feb 4, 2025

It makes possible to provide alignment property to the load/store operations indicating the known alignment of the pointer. It will allow to avoid expensive dynamic alignment checks.

@againull
Copy link
Contributor Author

againull commented Feb 4, 2025

As far as I understand, another way of doing this will be to handle annotated_ptr with alignment property, and I will add that possibility separately. But currently annotated_ptr is only supported for pointers to the global address space (and here we need local address space support as well) and right now it is not clear to me how much work it requires to add local address space support to annotated_ptr and whether it makes sense. So this alternative approach gives immediate benefit for both local and global pointers.

It makes possible to provide alignment<value> property to the
load/store operations indicating the alignment of the pointer.
It will allow to avoid expensive dynamic alignment checks.
@gmlueck
Copy link
Contributor

gmlueck commented Feb 5, 2025

As far as I understand, another way of doing this will be to handle annotated_ptr with alignment property, and I will add that possibility separately. But currently annotated_ptr is only supported for pointers to the global address space (and here we need local address space support as well) and right now it is not clear to me how much work it requires to add local address space support to annotated_ptr and whether it makes sense. So this alternative approach gives immediate benefit for both local and global pointers.

I don't think this is necessary. The APIs in this extension do not currently support annotated_ptr and they already take properties in another way.

Copy link
Contributor

@gmlueck gmlueck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec changes LGTM

againull added a commit that referenced this pull request Feb 7, 2025
Simplify handling of multiple address spaces and alignment checks.
Additional improvement regarding alignment checks is being done here (to
perform compile-time alignment check instead of expensive dynamic
check): #16882
Also this PR fixes alignment requirement for local address space:
16-byte alignment is required for both load and store.
@againull
Copy link
Contributor Author

againull commented Feb 7, 2025

sampling_3D.cpp failure on HIP/AMD is unrelated and visible on other PRs, reported it here: #16933

@againull againull merged commit fcc330e into intel:sycl Feb 10, 2025
16 of 17 checks passed
@againull againull deleted the alignment_load_store branch September 29, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants