-
Notifications
You must be signed in to change notification settings - Fork 610
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
Add missing calls to nvmlShutdown #5311
Conversation
- in some places, DALI initializes nvml but misses to call nvmlShutdown to shut it down gracefully Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
93f70ce
to
7e59bc1
Compare
!build |
CI MESSAGE: [12619731]: BUILD STARTED |
nvml::Init(); | ||
static float driver_version = nvml::GetDriverVersion(); | ||
nvml::Shutdown(); | ||
static bool device_supports_hw_decoder = nvml::isHWDecoderSupported(); | ||
return device_supports_hw_decoder && driver_version >= 455; |
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.
This is a potential perf hit.
nvml::Init(); | |
static float driver_version = nvml::GetDriverVersion(); | |
nvml::Shutdown(); | |
static bool device_supports_hw_decoder = nvml::isHWDecoderSupported(); | |
return device_supports_hw_decoder && driver_version >= 455; | |
static const float driver_version = []() { | |
nvml::Init(); | |
float ver = nvml::GetDriverVersion(); | |
nvml::Shutdown(); | |
return ver; | |
}(); | |
static const bool device_supports_hw_decoder = nvml::isHWDecoderSupported(); | |
return device_supports_hw_decoder && driver_version >= 455; |
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.
In the hot path, I would go for something faster. This is just a test. I don't think it will affect it much.
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.
True.
CI MESSAGE: [12619731]: BUILD PASSED |
Let me run with sanitizers ON as it passes the basic CI. |
CI MESSAGE: [12655173]: BUILD STARTED |
CI MESSAGE: [12655173]: BUILD FAILED |
to call nvmlShutdown to shut it down gracefully
Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
to call nvmlShutdown to shut it down gracefully
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