Skip to content

Commit

Permalink
Skip cleanup when no device was allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
tvegas1 committed Nov 27, 2023
1 parent 5a8a6d6 commit 4451375
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ucx_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,11 @@ static ncclResult_t nccl_ucx_free_worker(nccl_ucx_worker_t *ucx_worker) {
free(ucx_worker);
}

ucp_cleanup(ucp_ctx[dev]);
workers[dev] = NULL;
ucp_ctx[dev] = NULL;
if (ucp_ctx[dev]) {
ucp_cleanup(ucp_ctx[dev]);
ucp_ctx[dev] = NULL;
}
}

return ncclSuccess;
Expand Down

0 comments on commit 4451375

Please sign in to comment.