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