We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb81248 commit b9a8e1dCopy full SHA for b9a8e1d
support/accelerator.go
@@ -0,0 +1,17 @@
1
+package support
2
+
3
+var (
4
+ AMD = Accelerator{ResourceLabel: "amd.com/gpu"}
5
+ CPU = Accelerator{ResourceLabel: "nvidia.com/gpu"}
6
+ NVIDIA = Accelerator{ResourceLabel: "nvidia.com/gpu", PrometheusGpuUtilizationLabel: "DCGM_FI_DEV_GPU_UTIL"}
7
+)
8
9
+type Accelerator struct {
10
+ ResourceLabel string
11
+ PrometheusGpuUtilizationLabel string
12
+}
13
14
+// Method to check if the accelerator is a GPU
15
+func (a Accelerator) isGpu() bool {
16
+ return a != CPU
17
0 commit comments