Skip to content

Commit 7114352

Browse files
committed
UCT/CUDA: Do not print host unregister error (use diag)
Calling cuMemHostUnregister does not produce an error when invoked from a different context than the one it was originally registered in (or even without an active context). However, it will fail if the context in which the memory was allocated has been destroyed.
1 parent beab828 commit 7114352

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/uct/cuda/cuda_copy/cuda_copy_md.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,11 @@ UCS_PROFILE_FUNC(ucs_status_t, uct_cuda_copy_mem_dereg,
180180
(md, params),
181181
uct_md_h md, const uct_md_mem_dereg_params_t *params)
182182
{
183-
ucs_status_t status;
184-
185183
UCT_MD_MEM_DEREG_CHECK_PARAMS(params, 0);
186184

187-
if (params->memh == &uct_cuda_dummy_memh) {
188-
return UCS_OK;
189-
}
190-
191-
status = UCT_CUDADRV_FUNC_LOG_ERR(cuMemHostUnregister((void*)params->memh));
192-
if (status != UCS_OK) {
193-
return status;
185+
if (params->memh != &uct_cuda_dummy_memh) {
186+
UCT_CUDADRV_FUNC(cuMemHostUnregister((void*)params->memh),
187+
UCS_LOG_LEVEL_DIAG);
194188
}
195189

196190
return UCS_OK;

0 commit comments

Comments
 (0)