Unverified Commit 064cee2f authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fix compilation error on CUDA 13 (#5092)

parent 3076825e
...@@ -142,7 +142,13 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking ...@@ -142,7 +142,13 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
else else
flags += CU_CTX_SCHED_SPIN; flags += CU_CTX_SCHED_SPIN;
if (cuCtxCreate(&context, flags, device) == CUDA_SUCCESS) { #if CUDA_VERSION < 13000
CUresult result = cuCtxCreate(&context, flags, device);
#else
CUctxCreateParams params = {};
CUresult result = cuCtxCreate(&context, &params, flags, device);
#endif
if (result == CUDA_SUCCESS) {
this->deviceIndex = trialDeviceIndex; this->deviceIndex = trialDeviceIndex;
CUcontext popped; CUcontext popped;
cuCtxPopCurrent(&popped); cuCtxPopCurrent(&popped);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment