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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

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
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
1 participant