Skip to content

Commit 86fb1cc

Browse files
authored
[EBPF] gpu: change name for GPM metric (#46066)
### What does this PR do? This PR changes the name for the metric we use to emit the GPM metric `GPM_METRIC_SM_UTIL`, as we have found that it doesn't report the same concept. ### Motivation Accurate metric values. ### Describe how you validated your changes Tests passing. ### Additional Notes Co-authored-by: guillermo.julian <guillermo.julian@datadoghq.com>
1 parent 9b6b2d3 commit 86fb1cc

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/collector/corechecks/gpu/nvidia/collector_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ func TestConfiguredMetricPriority(t *testing.T) {
502502

503503
// Set up the expected metric order. The first collector in the list should have the highest priority over the rest.
504504
desiredMetricPriority := map[string][]CollectorName{
505-
"sm_active": {gpm, sampling, ebpf},
505+
"sm_active": {sampling, ebpf},
506506
"process.sm_active": {sampling, ebpf},
507507
}
508508

pkg/collector/corechecks/gpu/nvidia/gpm.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ var allGpmMetrics = map[nvml.GpmMetricId]gpmMetric{
4343
metricType: metrics.GaugeType,
4444
},
4545
nvml.GPM_METRIC_SM_UTIL: {
46-
name: "sm_active",
46+
// Despite the name, this GPM metric returns the percentage of SMs that were in use, not whether any of them were
47+
// active in the interval like gr_engine_active does.
48+
name: "sm_utilization",
4749
metricType: metrics.GaugeType,
4850
},
4951
nvml.GPM_METRIC_SM_OCCUPANCY: {

0 commit comments

Comments
 (0)