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

[SYCL][Reduction] Remove atomic64 check for float reductions #6434

Merged

Conversation

pgorlani
Copy link
Contributor

This patch

  1. removes the check on aspect::atomic64 for reductions using atomic operations of single precision floating-point values. This solves sycl::reduction for float not working on AMD gpu #6054. However, it's not strictly necessary since also [SYCL][HIP] Implement PI_DEVICE_INFO_ATOMIC_64 for HIP #6429 solves it.

  2. adds the possibility of using min and max atomic operations for reductions of double values.

@pgorlani pgorlani requested a review from a team as a code owner July 13, 2022 15:16
@pgorlani pgorlani requested a review from v-klochkov July 13, 2022 15:16
pgorlani added a commit to pgorlani/llvm-test-suite that referenced this pull request Jul 14, 2022
@v-klochkov
Copy link
Contributor

@aelovikov-intel - can you please review this patch as the only active developer of reduction these days?

sycl/include/sycl/ext/oneapi/reduction.hpp Outdated Show resolved Hide resolved
sycl/include/sycl/ext/oneapi/reduction.hpp Outdated Show resolved Hide resolved
sycl/include/sycl/ext/oneapi/reduction.hpp Outdated Show resolved Hide resolved
@aelovikov-intel
Copy link
Contributor

@v-klochkov do we require to run any performance tests before commit?

@pgorlani pgorlani force-pushed the remove-atomic64-check-for-f32-reductions branch from 26bedb6 to 6739e29 Compare July 25, 2022 09:21
@aelovikov-intel
Copy link
Contributor

Tag @steffenlarsen , in case you'd like to have a look as well.

steffenlarsen
steffenlarsen previously approved these changes Jul 28, 2022
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.

Looks good! @pgorlani - Please resolve the conflicts.

@pgorlani pgorlani force-pushed the remove-atomic64-check-for-f32-reductions branch from 6739e29 to 934454b Compare July 29, 2022 09:17
@pgorlani
Copy link
Contributor Author

Thanks for your reviews, @steffenlarsen @aelovikov-intel!

I rebased this PR onto the last refactoring of reductions, it should be fine.
The unexpectedly passed test is enabled in intel/llvm-test-suite#1097.

@againull againull merged commit a657117 into intel:sycl Aug 12, 2022
@aelovikov-intel
Copy link
Contributor

Thanks!

aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Sep 27, 2022
intel#6434 enabled treating "float" as
suitable for Reduction::has_fast_atomics implementation but that is
slower than the one available under Reduction::has_fast_reduce. Make
sure to check for the latter first.
steffenlarsen pushed a commit that referenced this pull request Sep 29, 2022
#6434 enabled treating "float" as
suitable for Reduction::has_fast_atomics implementation but that is
slower than the one available under Reduction::has_fast_reduce. Make
sure to check for the latter first.
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.

None yet

5 participants