Skip to content

[SYCL][CUDA][libclc] Add software atomics implementations for lower sm versions #5998

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

Merged
merged 5 commits into from
Apr 25, 2022

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Apr 11, 2022

Adds software implementations for various atomics for sm versions blow ones where they are supported natively. Now all atomics, except for the ones using system scope are supported regardless of the sm version.

Now SYCL_USE_NATIVE_FP_ATOMICS is also defined for CUDA by default.

Closes #5936.

Tested by: intel/llvm-test-suite#985

@t4c1
Copy link
Contributor Author

t4c1 commented Apr 11, 2022

/verify with intel/llvm-test-suite#985

@t4c1 t4c1 requested a review from a team as a code owner April 11, 2022 11:02
Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

FE changes look ok to me

Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

FE changes look okay to me.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@t4c1
Copy link
Contributor Author

t4c1 commented Apr 25, 2022

Can this be merged?

@steffenlarsen
Copy link
Contributor

Test failures are unrelated.
Precommit:

  • SYCL :: Basic/context-with-multiple-devices.cpp
    OCL x64 test suite:
  • SYCL :: DiscardEvents/invalid_event.cpp

@steffenlarsen steffenlarsen merged commit 7bc8447 into intel:sycl Apr 25, 2022
pvchupin pushed a commit to intel/llvm-test-suite that referenced this pull request May 3, 2022
Reduces sm version requirement for atomic_ref tests.

Testing this properly would require duplicating all the atomic ref tests for sm_50 (as in this PR) and for sm_70 (for system scope atomics). That would duplicate all the slowest tests. To avoid significant increase of test running time I am instead removing testing for system atomics, which have relatively simple implementations.

Tests intel/llvm#5998
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…lvm-test-suite#985)

Reduces sm version requirement for atomic_ref tests.

Testing this properly would require duplicating all the atomic ref tests for sm_50 (as in this PR) and for sm_70 (for system scope atomics). That would duplicate all the slowest tests. To avoid significant increase of test running time I am instead removing testing for system atomics, which have relatively simple implementations.

Tests intel#5998
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.

SYCL_USE_NATIVE_FP_ATOMICS not set for NVIDIA targets
5 participants