Skip to content

Commit

Permalink
Check for default device
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Sep 25, 2023
1 parent 41253bd commit f6977cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/Cuda/Kokkos_Cuda_Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,11 @@ Cuda::Cuda(int device_id, cudaStream_t stream)
<< " Raised by Kokkos::Cuda::Cuda().\n";
Kokkos::abort(ss.str().c_str());
}
// FIXME_CUDA
if (device_id != Cuda().cuda_device())
Kokkos::abort(
"Currently, the device id must match the device id used when Kokkos "
"was initialized!");
m_space_instance->initialize(device_id, stream, /*manage_stream*/ false);
}

Expand Down

0 comments on commit f6977cf

Please sign in to comment.