gpuagent: refresh GFX max clock on the get path for RDNA only (GPUOP-… - #91
Merged
sarat-k merged 1 commit intoAug 27, 2026
Merged
Conversation
…985) GFX high_frequency (max clock) was filled once in smi_gpu_init_immutable_attrs and only copied thereafter. On RDNA the boost ceiling is mutable and rises under load, so the init snapshot goes stale versus the live amd-smi value, failing the GPU_MAX_CLOCK accuracy check. CDNA has a fixed DPM range so it never drifts. Record the RDNA GPUs at init (target_graphics_version top nibble == 1) and, only for those, re-read amdsmi_get_clock_info(GFX) in smi_fill_clock_status_ at most once per 5s per GPU, caching hi/lo and re-applying it onto the per-get spec copy. CDNA GPUs skip the refresh entirely, keeping the MI get path unchanged. The amdsmi call runs outside g_gfx_maxclk_mutex so one GPU's refresh never blocks the others' clock-status fills.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…985)
GFX high_frequency (max clock) was filled once in smi_gpu_init_immutable_attrs and only copied thereafter. On RDNA the boost ceiling is mutable and rises under load, so the init snapshot goes stale versus the live amd-smi value, failing the GPU_MAX_CLOCK accuracy check. CDNA has a fixed DPM range so it never drifts.
Record the RDNA GPUs at init (target_graphics_version top nibble == 1) and, only for those, re-read amdsmi_get_clock_info(GFX) in smi_fill_clock_status_ at most once per 5s per GPU, caching hi/lo and re-applying it onto the per-get spec copy. CDNA GPUs skip the refresh entirely, keeping the MI get path unchanged. The amdsmi call runs outside g_gfx_maxclk_mutex so one GPU's refresh never blocks the others' clock-status fills.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist