Skip to content
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

Work around sub_group load/store issues #1485

Merged
merged 4 commits into from
Dec 9, 2023

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Work-around issue with sub_group::load, sub_group::store functions

These functions are from oneAPI sycl_ext_oneapi_group_load_store extension.
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_group_load_store.asciidoc

The current implementation of these primitives seem to require certain pointer alignment.

This PR adds bool template parameter to contig functors for all elementwise functions,
and the elementwise_common_impl checks alignment all pointers. If any is not aligned to
the expected boundary, a generic implementation is used instead of the one using
sg.load/sg.store.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

These functions are from oneAPI sycl_ext_oneapi_group_load_store extension.
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_group_load_store.asciidoc

The current implementation of these primitives seem to require certain pointer alignment.

This PR adds bool template parameter to contig functors for all elementwise functions,
and the elementwise_common_impl checks alignment all pointers. If any is not aligned to
the expected boundary, a generic implementation is used instead of the one using
sg.load/sg.store
@ndgrigorian
Copy link
Collaborator

ndgrigorian commented Dec 8, 2023

@oleksandr-pavlyk
The contiguous copy, where, and clip kernels also use sg load/store. They will need to be changed as well.

Copy link

github-actions bot commented Dec 8, 2023

@coveralls
Copy link
Collaborator

coveralls commented Dec 8, 2023

Coverage Status

coverage: 85.998%. remained the same
when pulling 86153f3 on work-around-sg-loadstore-issues
into 0b63d4f on master.

Copy link

github-actions bot commented Dec 8, 2023

Array API standard conformance tests for dpctl=0.15.1dev2=py310h15de555_24 ran successfully.
Passed: 876
Failed: 56
Skipped: 59

Moves alignment.hpp into dpctl/tensor/libtensor/include/kernels

Fixes a small typo in angle.hpp
Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

Assuming CI succeeds, LGTM

Copy link

github-actions bot commented Dec 9, 2023

Array API standard conformance tests for dpctl=0.15.1dev2=py310h15de555_26 ran successfully.
Passed: 876
Failed: 56
Skipped: 59

@oleksandr-pavlyk oleksandr-pavlyk merged commit a4369ac into master Dec 9, 2023
42 of 44 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the work-around-sg-loadstore-issues branch December 9, 2023 04:36
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.

3 participants