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

Update simd warp example #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pkestene
Copy link
Contributor

@pkestene pkestene commented Dec 5, 2023

A tentative fix for this example.

the type simd::simd<double,simd::simd_abi::cuda_warp<32>>, used in the old example, disappeared, so replaced by simd_t = Kokkos::Experimental::native_simd<double> which width/ simd size is 1 when exec space is Cuda (scalar type).

Kokkos::Timer timer;
for(int r = 0; r<R; r++) {
Kokkos::parallel_for("Combine",Kokkos::TeamPolicy<>(data.extent(0),1,simd_t::size()),
Kokkos::parallel_for("Combine",Kokkos::TeamPolicy<>(data.extent(0)/team_size,team_size,simd_t::size()),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Kokkos::parallel_for("Combine",Kokkos::TeamPolicy<>(data.extent(0)/team_size,team_size,simd_t::size()),
Kokkos::parallel_for("Combine",Kokkos::TeamPolicy<>(data.extent(0)/team_size,team_size,simd_t::size()),

Copy link
Member

Choose a reason for hiding this comment

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

I think there is an indent issue here.

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.

2 participants