-
Notifications
You must be signed in to change notification settings - Fork 618
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
Fix inconsistent calls to nvml::Init and nvml::Shutdown #5317
Conversation
CI MESSAGE: [12783002]: BUILD STARTED |
- in the worker thread and thread poll the nvml is called only for non-CPU pipelines but the shutdown is called unconditionally Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
2d1b384
to
1941091
Compare
CI MESSAGE: [12783062]: BUILD STARTED |
CI MESSAGE: [12787486]: BUILD STARTED |
CI MESSAGE: [12787486]: BUILD FAILED |
dali/util/nvml.h
Outdated
@@ -241,6 +241,43 @@ inline void Shutdown() { | |||
CUDA_CALL(nvmlShutdown()); | |||
} | |||
|
|||
|
|||
class nvmlHandle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have NvmlError and NvmlBadAlloc, so I guess it'd be good to have Nvml... something.
I'm not convinced we should call it NvmlHandle, since it's not a handle nor does it wrap any handle.
Other names to consider:
NvmlScope
NvmlInstance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Fixed.
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
CI MESSAGE: [12807069]: BUILD STARTED |
CI MESSAGE: [12810692]: BUILD STARTED |
CI MESSAGE: [12810908]: BUILD STARTED |
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
CI MESSAGE: [12813834]: BUILD STARTED |
CI MESSAGE: [12813834]: BUILD PASSED |
only for non-CPU pipelines but the shutdown is called
unconditionally
RAII pattern
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
only for non-CPU pipelines but the shutdown is called
unconditionally
RAII pattern
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A