gpm

package
v0.12.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package gpm tracks the NVIDIA per-GPU GPM metrics.

Package gpm provides the NVIDIA GPM metrics collection and reporting.

Index

Constants

View Source
const (
	// Name is the component name reported by the NVIDIA GPM checker.
	Name = "accelerator-nvidia-gpm"
)
View Source
const SubSystem = "accelerator_nvidia_gpm"

SubSystem is the Prometheus subsystem name for NVIDIA GPM metrics.

Variables

This section is empty.

Functions

func GetGPMMetrics added in v0.9.0

func GetGPMMetrics(ctx context.Context, dev device.Device, sampleDuration time.Duration, metricIDs ...nvml.GpmMetricId) (map[nvml.GpmMetricId]float64, error)

GetGPMMetrics returns the map from metric ID to value for a device. Don't call these in parallel for multiple devices. It "SIGSEGV: segmentation violation" in cgo execution. Returns nil if it's not supported. ref. https://github.com/NVIDIA/go-nvml/blob/main/examples/gpm-metrics/main.go

func New

func New(gpudInstance *components.GPUdInstance) (components.Component, error)

New creates the NVIDIA GPM component.

func SupportedByDevice added in v0.11.1

func SupportedByDevice(dev device.Device) (bool, error)

SupportedByDevice reports whether GPM is supported for the given device.

Types

type Metrics added in v0.11.1

type Metrics struct {
	// Time is the time the metrics were collected.
	Time metav1.Time `json:"time"`

	// Device UUID that these GPM metrics belong to.
	UUID string `json:"uuid"`

	// The duration of the sample.
	SampleDuration metav1.Duration `json:"sample_duration"`

	// The metrics.
	Metrics map[nvml.GpmMetricId]float64 `json:"metrics"`
}

Metrics contains the GPM metrics for a device.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL