File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 35
35
TestTimeoutLong = 5 * time .Minute
36
36
TestTimeoutDouble = 20 * time .Minute
37
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" }
38
41
)
39
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
+
40
53
func init () {
41
54
if value , ok := os .LookupEnv ("CODEFLARE_TEST_TIMEOUT_SHORT" ); ok {
42
55
if duration , err := time .ParseDuration (value ); err == nil {
You can’t perform that action at this time.
0 commit comments