Skip to content

Commit 91943ce

Browse files
committed
Add #if for cuCtxCreate compat break in CUDA 13
1 parent f457962 commit 91943ce

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/cpp/cuda.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,13 @@ namespace pycuda
859859
context::prepare_context_switch();
860860

861861
CUcontext ctx;
862+
863+
#if CUDAPP_CUDA_VERSION >= 13000
864+
CUDAPP_CALL_GUARDED_THREADED(cuCtxCreate, (&ctx, nullptr, flags, m_device));
865+
#else
862866
CUDAPP_CALL_GUARDED_THREADED(cuCtxCreate, (&ctx, flags, m_device));
867+
#endif
868+
863869
boost::shared_ptr<context> result(new context(ctx));
864870
context_stack::get().push(result);
865871
return result;

0 commit comments

Comments
 (0)