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: Don't use shuffles for top-level reductions #7009

Merged
merged 2 commits into from
May 20, 2024

Conversation

masterleinad
Copy link
Contributor

Partly reverts #6750. It turns out that using shuffles using more generic types such as in

Kokkos::parallel_reduce("kk_wup", N, KOKKOS_LAMBDA(int i, double& lsum1, double& lsum2) {
                      lsum1 += x_data_[i]*y_data_[i];
                      lsum2 += x_data_[i]*y_data_[i];},
                      result1, result2);

is much slower. Given that #6750 brought shuffle reductions only on par with local memory reductions, it makes sense to always use the latter for now. I have a slight preference for keeping the code for shuffle reductions (like we do for Cuda and HIP).

@masterleinad
Copy link
Contributor Author

The SYCL build passed.

@masterleinad masterleinad requested a review from nliber May 20, 2024 12:32
@crtrott crtrott merged commit 64fe756 into kokkos:develop May 20, 2024
28 of 29 checks passed
@ndellingwood
Copy link
Contributor

@masterleinad does this need a changelog entry for 4.4? Looks like it may have impacts on performance?

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

4 participants