Skip to content

Commit

Permalink
Protect against using CUDA without VMM support.
Browse files Browse the repository at this point in the history
Fixes #13005.

bot:notacherrypick

Signed-off-by: George Bosilca <[email protected]>
  • Loading branch information
bosilca committed Jan 3, 2025
1 parent 23b6d34 commit 9ae79b1
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 9ae79b1

Please sign in to comment.