We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb81248 commit 1feefd6Copy full SHA for 1feefd6
support/support.go
@@ -35,8 +35,21 @@ var (
35
TestTimeoutLong = 5 * time.Minute
36
TestTimeoutDouble = 20 * time.Minute
37
TestTimeoutGpuProvisioning = 30 * time.Minute
38
+ AMD = Accelerator{ResourceLabel: "amd.com/gpu"}
39
+ CPU = Accelerator{ResourceLabel: "nvidia.com/gpu"}
40
+ NVIDIA = Accelerator{ResourceLabel: "nvidia.com/gpu", PrometheusGpuUtilizationLabel: "DCGM_FI_DEV_GPU_UTIL"}
41
)
42
43
+type Accelerator struct {
44
+ ResourceLabel string
45
+ PrometheusGpuUtilizationLabel string
46
+}
47
+
48
+// Method to check if the accelerator is a GPU
49
+func (a Accelerator) isGpu() bool {
50
+ return a != CPU
51
52
53
func init() {
54
if value, ok := os.LookupEnv("CODEFLARE_TEST_TIMEOUT_SHORT"); ok {
55
if duration, err := time.ParseDuration(value); err == nil {
0 commit comments