Skip to content

[AUTO] Add GPUUtilization fallback for iGPU telemetry key - #37390

Open
wgzintel wants to merge 2 commits into
openvinotoolkit:masterfrom
wgzintel:guozhong/filter_gpu_name
Open

[AUTO] Add GPUUtilization fallback for iGPU telemetry key#37390
wgzintel wants to merge 2 commits into
openvinotoolkit:masterfrom
wgzintel:guozhong/filter_gpu_name

Conversation

@wgzintel

Copy link
Copy Markdown
Contributor

Details:

The integrated GPU utilization may be reported under either "IGPUUtilization" or "GPUUtilization" depending on the platform.
Fall back to "GPUUtilization" when "IGPUUtilization" is absent, so iGPU utilization is not silently dropped.

@wgzintel
wgzintel requested a review from a team as a code owner August 12, 2026 08:03
@wgzintel
wgzintel requested review from peterchen-intel, wangleis and yangwang201911 and a lite review from Copilot and removed request for a team August 12, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds a fallback so integrated GPU utilization isn’t dropped when platforms report it under an alternate telemetry key.

Changes:

  • Introduces a GPUUtilization metric constant to use as a fallback for iGPU utilization.
  • Updates telemetry parsing to look up IGPUUtilization, then fall back to GPUUtilization when absent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/plugins/auto/src/utils/device_telemetry.hpp Adds a fallback metric key constant for iGPU utilization.
src/plugins/auto/src/utils/device_telemetry.cpp Implements fallback lookup logic when parsing the Performance section.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/plugins/auto/src/utils/device_telemetry.hpp
Comment thread src/plugins/auto/src/utils/device_telemetry.cpp
Comment thread src/plugins/auto/src/utils/device_telemetry.cpp
@wgzintel
wgzintel requested a lite review from Copilot August 12, 2026 08:36
@github-actions github-actions Bot added the category: AUTO OpenVINO AUTO device selection plugin label Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/plugins/auto/src/utils/device_telemetry.cpp:90

  • metric_key is always the originally requested key (e.g., "IGPUUtilization"), so if the fallback key ("GPUUtilization") is used successfully, the “not a number” warning will incorrectly report the primary key. Consider logging the actual resolved JSON key (e.g., metric_it.key()) in these warnings (and any downstream logs that include the key), so troubleshooting reflects what was actually read.
            if (!metric_it->is_number()) {
                LOG_WARNING_TAG("TelemetryClient: Performance value for key %s is not a number", metric_key.c_str());
                return std::nullopt;
            }
            float value = metric_it->get<float>();

src/plugins/auto/src/utils/device_telemetry.cpp:74

  • The function-local static const std::string is a bit unexpected here and can obscure intent (and introduces a one-time initialization path). A simpler approach is to construct a local std::string (or, if supported by your JSON library version, pass a std::string_view directly) when the fallback branch is taken. This keeps the lookup logic straightforward and avoids retaining an extra static object for the process lifetime.
            if (igpu_fallback_attempted) {
                static const std::string igpu_fallback_key{k_igpu_utilization_fallback_metric};
                metric_it = performance.find(igpu_fallback_key);
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: AUTO OpenVINO AUTO device selection plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants