-
Notifications
You must be signed in to change notification settings - Fork 25
feat: support for local gpu telemetry via pynvml #595
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
Open
ajcasagrande
wants to merge
8
commits into
main
Choose a base branch
from
ajc/pynvml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4fc7e12
feat: support for local gpu telemetry via pynvml
ajcasagrande 980033a
update tests
ajcasagrande 0bf2588
code review and add library
ajcasagrande 3e5b612
fix tests
ajcasagrande 9d5a0c2
Merge branch 'main' into ajc/pynvml
ajcasagrande 6e61701
Merge remote-tracking branch 'origin/main' into ajc/pynvml
ajcasagrande be16571
improve pynvml add gpm for sm util
ajcasagrande 2e7356d
Merge branch 'main' into ajc/pynvml
ajcasagrande File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import numpy as np | ||
|
|
@@ -28,14 +28,34 @@ class TelemetryMetrics(AIPerfBaseModel): | |
| default=None, description="Cumulative energy consumption in MJ" | ||
| ) | ||
| gpu_utilization: float | None = Field( | ||
| default=None, description="GPU utilization percentage (0-100)" | ||
| default=None, | ||
| description="GPU utilization percentage (0-100). " | ||
| "Percent of time over the past sample period during which one or more kernels was executing on the GPU.", | ||
| ) | ||
| gpu_memory_used: float | None = Field( | ||
| default=None, description="GPU memory used in GB" | ||
| ) | ||
| gpu_temperature: float | None = Field( | ||
| default=None, description="GPU temperature in °C" | ||
| ) | ||
| mem_utilization: float | None = Field( | ||
| default=None, | ||
| description="Memory bandwidth utilization percentage (0-100). " | ||
| "Percent of time over the past sample period during which global (device) memory was being read or written.", | ||
| ) | ||
| sm_utilization: float | None = Field( | ||
| default=None, | ||
| description="Streaming multiprocessor utilization percentage (0-100)", | ||
| ) | ||
| decoder_utilization: float | None = Field( | ||
| default=None, description="Video decoder (NVDEC) utilization percentage (0-100)" | ||
| ) | ||
| encoder_utilization: float | None = Field( | ||
| default=None, description="Video encoder (NVENC) utilization percentage (0-100)" | ||
| ) | ||
| jpg_utilization: float | None = Field( | ||
| default=None, description="JPEG decoder utilization percentage (0-100)" | ||
| ) | ||
| xid_errors: float | None = Field( | ||
| default=None, description="Value of the last XID error encountered" | ||
| ) | ||
|
|
@@ -92,7 +112,7 @@ class TelemetryRecord(GpuMetadata): | |
| description="Nanosecond wall-clock timestamp when telemetry was collected (time_ns)" | ||
| ) | ||
| dcgm_url: str = Field( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this identifier be renamed to something like |
||
| description="Source DCGM endpoint URL (e.g., 'http://node1:9401/metrics')" | ||
| description="Source identifier (DCGM URL e.g., 'http://node1:9401/metrics' or 'pynvml://localhost')" | ||
| ) | ||
| telemetry_data: TelemetryMetrics = Field( | ||
| description="GPU metrics snapshot collected at this timestamp" | ||
|
|
||
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
Oops, something went wrong.
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.
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 only useful when the server is being run locally, right?
should we display a warning if the server url is not localhost and user uses
--gpu-telemetry pynvml?