cuda.bindings._v2.driver.ctx_set_current#
- cuda.bindings._v2.driver.ctx_set_current(intptr_t ctx)#
Binds the specified CUDA context to the calling CPU thread.
Binds the specified CUDA context to the calling CPU thread. If
ctxis NULL then the CUDA context previously bound to the calling CPU thread is unbound andCUDA_SUCCESSis returned. If there exists a CUDA context stack on the calling CPU thread, this will replace the top of that stack withctx. Ifctxis NULL then this will be equivalent to popping the top of the calling CPU thread’s CUDA context stack (or a no-op if the calling CPU thread’s CUDA context stack is empty).- Parameters:
ctx (intptr_t) – Context to bind to the calling CPU thread.
See also
cuCtxSetCurrent