Skip to content

Commit 8d7f86c

Browse files
authored
Fix error reporting in Optix.cpp (#325)
1 parent 81f4e20 commit 8d7f86c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Optix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static CUcontext getCurrentDeviceContext()
6262
CUcontext cudaContext = nullptr;
6363
CUresult primaryCtxStatus = cuDevicePrimaryCtxRetain(&cudaContext, device);
6464
if (primaryCtxStatus != CUDA_SUCCESS) {
65-
cuGetErrorString(status, &error);
66-
throw std::runtime_error(fmt::format("failed to get primary CUDA context: {} ({})\n", error, status));
65+
cuGetErrorString(primaryCtxStatus, &error);
66+
throw std::runtime_error(fmt::format("failed to get primary CUDA context: {} ({})\n", error, primaryCtxStatus));
6767
}
6868
assert(cudaContext != nullptr);
6969
return cudaContext;

0 commit comments

Comments
 (0)