Skip to content

Commit

Permalink
Fix error reporting in Optix.cpp (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
prybicki authored Aug 20, 2024
1 parent 81f4e20 commit 8d7f86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Optix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ static CUcontext getCurrentDeviceContext()
CUcontext cudaContext = nullptr;
CUresult primaryCtxStatus = cuDevicePrimaryCtxRetain(&cudaContext, device);
if (primaryCtxStatus != CUDA_SUCCESS) {
cuGetErrorString(status, &error);
throw std::runtime_error(fmt::format("failed to get primary CUDA context: {} ({})\n", error, status));
cuGetErrorString(primaryCtxStatus, &error);
throw std::runtime_error(fmt::format("failed to get primary CUDA context: {} ({})\n", error, primaryCtxStatus));
}
assert(cudaContext != nullptr);
return cudaContext;
Expand Down

0 comments on commit 8d7f86c

Please sign in to comment.