From 7dbac6ce0d4387a354d120d12cf9b0055905a0d6 Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Fri, 18 Jul 2025 10:43:37 +0100 Subject: [PATCH] [UR][CUDA][Coverity] Don't check nvmlShutdown return in destructor `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. --- unified-runtime/source/adapters/cuda/device.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified-runtime/source/adapters/cuda/device.hpp b/unified-runtime/source/adapters/cuda/device.hpp index 833c05e141b17..b97b5bb11efca 100644 --- a/unified-runtime/source/adapters/cuda/device.hpp +++ b/unified-runtime/source/adapters/cuda/device.hpp @@ -113,7 +113,7 @@ struct ur_device_handle_t_ : ur::cuda::handle_base { umfMemoryProviderDestroy(MemoryProviderShared); } if (NVMLDevice.has_value()) { - UR_CHECK_ERROR(nvmlShutdown()); + nvmlShutdown(); } cuDevicePrimaryCtxRelease(CuDevice); }