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

Check error code from cudaOccupancyMaxActiveBlocksPerMultiprocessor #2172

Closed
malphil opened this issue Jun 6, 2019 · 0 comments
Closed

Check error code from cudaOccupancyMaxActiveBlocksPerMultiprocessor #2172

malphil opened this issue Jun 6, 2019 · 0 comments
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting

Comments

@malphil
Copy link

malphil commented Jun 6, 2019

Hey all,

It's possible inside Kokkos_Cuda_Parallel.hpp for block.y = 0 in the following code, which can show up as an arithmetic divide-by-zero error.

  inline
  void execute() const
    {
      const typename Policy::index_type nwork = m_policy.end() - m_policy.begin();
      const int block_size = Kokkos::Impl::cuda_get_opt_block_size< ParallelFor, LaunchBounds>( m_functor , 1, 0 , 0 );
      const dim3 block(  1 , block_size , 1);
      const dim3 grid( std::min( typename Policy::index_type(( nwork + block.y - 1 ) / block.y) , typename Policy::index_type(cuda_internal_maximum_grid_count()) ) , 1 , 1);

      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
    }

Is it possible to check the error code from cudaOccupancyMaxActiveBlocksPerMultiprocessor or verify that cuda_get_opt_block_size does not return 0 prior to the division?

Thanks!

@ibaned ibaned added the Enhancement Improve existing capability; will potentially require voting label Jun 21, 2019
@ibaned ibaned self-assigned this Jun 21, 2019
@ibaned ibaned added this to the Tentative 3.1 Release milestone Sep 4, 2019
@crtrott crtrott assigned crtrott and masterleinad and unassigned ibaned and crtrott Mar 2, 2020
@crtrott crtrott added this to To do in Milestone: Release 3.1 via automation Mar 2, 2020
@crtrott crtrott moved this from To do to Done in Milestone: Release 3.1 Mar 10, 2020
@crtrott crtrott closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
No open projects
Development

No branches or pull requests

4 participants