Skip to content

Commit

Permalink
Merge pull request #13016 from bosilca/v4.1/fix/13005
Browse files Browse the repository at this point in the history
Protect against using CUDA without VMM support.
  • Loading branch information
jsquyres authored Jan 8, 2025
2 parents 23b6d34 + 9ae79b1 commit 31f6f4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opal/mca/common/cuda/common_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,7 @@ static int mca_common_cuda_check_mpool(CUdeviceptr dbuf, CUmemorytype *mem_type,

static int mca_common_cuda_get_primary_context(CUdevice dev_id, CUcontext *pctx)
{
#if OPAL_CUDA_VMM_SUPPORT
CUresult result;
unsigned int flags;
int active;
Expand All @@ -1831,7 +1832,7 @@ static int mca_common_cuda_get_primary_context(CUdevice dev_id, CUcontext *pctx)
result = cuFunc.cuDevicePrimaryCtxRetain(pctx, dev_id);
return OPAL_SUCCESS;
}

#endif /* OPAL_CUDA_VMM_SUPPORT */
return OPAL_ERROR;
}

Expand Down

0 comments on commit 31f6f4d

Please sign in to comment.