Skip to content

Commit

Permalink
add the cuda error code to the exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
benson31 committed May 9, 2019
1 parent 80e2167 commit ae00b5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/El/core/imports/cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ struct CudaError : std::runtime_error
{
std::ostringstream oss;
oss << ( async ? "Asynchronous CUDA error" : "CUDA error" )
<< " (" << file << ":" << line << "): "
<< " (error code: " << cuda_error << ") "
<< "(" << file << ":" << line << "): "
<< cudaGetErrorString(cuda_error);
return oss.str();
}
Expand Down

0 comments on commit ae00b5b

Please sign in to comment.