Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions support/accelerator.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package support

var (
AMD = Accelerator{Type: "gpu", ResourceLabel: "amd.com/gpu"}
CPU = Accelerator{Type: "cpu"}
NVIDIA = Accelerator{Type: "gpu", ResourceLabel: "nvidia.com/gpu", PrometheusGpuUtilizationLabel: "DCGM_FI_DEV_GPU_UTIL"}
)

type Accelerator struct {
Type string
ResourceLabel string
PrometheusGpuUtilizationLabel string
}

// Method to check if the accelerator is a GPU
func (a Accelerator) isGpu() bool {
return a != CPU
}