Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC/CUDA: reduce verbosity for cu ctx doesn't exist #1025

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/mc/cuda/mc_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,14 @@ ucc_status_t ucc_mc_cuda_get_resources(ucc_mc_cuda_resources_t **resources)
#if CUDA_VERSION < 12000
cu_ctx_id = 1;
#else
status = CUDADRV_FUNC(cuCtxGetId(cu_ctx, &cu_ctx_id));
if (ucc_unlikely(status != UCC_OK)) {
CUresult cu_status;
cu_status = cuCtxGetId(cu_ctx, &cu_ctx_id);
if (ucc_unlikely(cu_status != CUDA_SUCCESS)) {
/* worakround for pytorch, progress thread doesn't have cuda context for GPU 0*/
/* cuda context might be not initialized, try to proceed with default device*/
cu_ctx_id = 0x12345;
mc_debug(&ucc_mc_cuda.super, "failed to get currect CUDA context ID");
mc_debug(&ucc_mc_cuda.super,
"failed to get current CUDA context ID (%d)", cu_status);
}
#endif

Expand Down
Loading