Skip to content
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 reading of graphics and memory clocks #271

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

benvanwerkhoven
Copy link
Collaborator

This pull request is a fix for reading clock frequencies with NVML that was accidentally broken by a previous commit. The interface we have around NVML is a bit tricky, there are many instances of 'clocks', whether they are the current clock used by the GPU, the target clock frequency the user requested, the supported clocks as reported by the GPU, the applications clock, the locked clock, it's easy to make mistakes.

With this fix, the NVML interface remembers what the last clock setting was that the user has set (if any) during this run. When attempting to set the clock, we use this local copy to check if we need to set the clocks given the user requested clock settings.

Reading the clock using the NVML interface, so using nvml.gr_clock or nvml.mem_clock should always return the current clock as observed as it's being used by the device.

Copy link

@fjwillemsen fjwillemsen merged commit 6ad115c into master Jul 24, 2024
3 checks passed
@fjwillemsen fjwillemsen deleted the fix_nvml_clock_reading branch July 24, 2024 15:21
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.

2 participants