CmdPal: Accurate GPU usage in Dock#48710
Open
michaeljolley wants to merge 1 commit into
Open
Conversation
Per-engine 3D utilization values were summed across all engines on the same physical adapter, which produced totals >100% on multi-engine GPUs (e.g. Intel UHD 630 under load showed 104-118%). Bucket cooked values by (physId, engineId), reduce each adapter to the max engine utilization (matching Task Manager), and clamp to [0, 100]. Mirrors the bounded-counter approach used for CPU in #46381.
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.
GPUStats.GetData()summed the cookedUtilization Percentagevalue of everyengtype=3DGPU-Engine performance-counter instance for a given physical adapter. Each instance is a(process, engine)pair. Summing across processes for a single engine is correct (gives total engine utilization), but summing across multiple 3D engines on the same adapter compounds them and produces values >100% (the 104%/118% screenshots in the issue). The displayed valuesum / 100therefore exceeded 1.0, and the chart fed the raw inflatedsumdirectly.Fix
Mirroring the bounded-counter approach used for CPU in #46381:
(physId, engineId)rather than justphysId.[0, 100]before storing it as a 0–1 fraction inData.Usageand pushing to the chart.NaN/Infinity/ negative cooked values, and skip instances whose engine id can't be parsed.Fixes #48677