gpucounts

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package gpucounts monitors the GPU count of the system. Optional, enabled if the host has NVIDIA GPUs.

Index

Constants

View Source
const (
	// Name is the component name reported by the NVIDIA GPU count checker.
	Name = "accelerator-nvidia-gpu-counts"

	// EventNameMisMatch records a GPU count mismatch event in the event store.
	EventNameMisMatch = "gpu-count-mismatch"
)

Variables

This section is empty.

Functions

func New

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

New creates the NVIDIA GPU count component.

func SetDefaultExpectedGPUCounts

func SetDefaultExpectedGPUCounts(cnt ExpectedGPUCounts)

SetDefaultExpectedGPUCounts updates the default expected GPU count thresholds.

Types

type ExpectedGPUCounts

type ExpectedGPUCounts struct {
	// Count is the expected number of GPU devices.
	// If not set, it defaults to 0.
	Count int `json:"count"`
}

ExpectedGPUCounts configures the expected number of GPUs.

func GetDefaultExpectedGPUCounts

func GetDefaultExpectedGPUCounts() ExpectedGPUCounts

GetDefaultExpectedGPUCounts returns the default expected GPU count thresholds.

func (*ExpectedGPUCounts) IsZero

func (ec *ExpectedGPUCounts) IsZero() bool

IsZero returns true if the expected GPU counts are not set.

Jump to

Keyboard shortcuts

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