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

Fix sigFPE in HIP blocksize deduction #3378

Conversation

skyreflectedinmirrors
Copy link
Contributor

Requires #3333 for testing on ROCm 3.7

The:

  using Policy =
      Kokkos::TeamPolicy<ExecutionSpace, Kokkos::LaunchBounds<32, 1>>;

in test_block_deduction_bug_pr_3103, causes:

int block_size = std::min(attr.maxThreadsPerBlock, max_threads_per_block);

to be set to 32 (as this takes the 3.7 path). This forces:

(block_size / HIPTraits::WarpSize))

to zero, resulting in a sigFPE.

I've also added a guard on regs_per_wavefront in case we ever launch a null kernel, and attr.numRegs is somehow zero.

Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks OK to me. We should see if this helps in #3333.

@skyreflectedinmirrors
Copy link
Contributor Author

All the HIP tests in 3.5 are passing, CUDA is failing with no devices present -- probably just needs a re-test?

@dalg24
Copy link
Member

dalg24 commented Sep 10, 2020

Retest this please

@dalg24 dalg24 merged commit 593597c into kokkos:develop Sep 14, 2020
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