Skip to content

[UR][CUDA][Coverity] Don't check nvmlShutdown return in destructor #19512

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

npmiller
Copy link
Contributor

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

`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.
@npmiller npmiller requested a review from a team as a code owner July 18, 2025 09:50
@npmiller npmiller requested a review from jchlanda July 18, 2025 09:50
@ldrumm ldrumm merged commit 65264b6 into intel:sycl Jul 21, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity] Throw from destructor of ur_device_handle_t in UR CUDA adapter
3 participants