Skip to content

Commit 65264b6

Browse files
authored
[UR][CUDA][Coverity] Don't check nvmlShutdown return in destructor (#19512)
`UR_CHECK_ERROR` throws an exception so we can't use it from a destructor. Since devices only get released at application shutdown, there's not much we can do if `nvmlShutdown` reports an error, and the OS will promptly cleanup anything left as it tears down the process anyway. So just skip checking the error code from `nvmlShutdown`, this is already what we do for other cleanup/shutdown in this destructor. Fixes: #19500
1 parent 2c20fc1 commit 65264b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unified-runtime/source/adapters/cuda/device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct ur_device_handle_t_ : ur::cuda::handle_base {
113113
umfMemoryProviderDestroy(MemoryProviderShared);
114114
}
115115
if (NVMLDevice.has_value()) {
116-
UR_CHECK_ERROR(nvmlShutdown());
116+
nvmlShutdown();
117117
}
118118
cuDevicePrimaryCtxRelease(CuDevice);
119119
}

0 commit comments

Comments
 (0)