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 3535 TestTimeoutLong = 5 * time .Minute
3636 TestTimeoutDouble = 20 * time .Minute
3737 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" }
3841)
3942
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+
4053func init () {
4154 if value , ok := os .LookupEnv ("CODEFLARE_TEST_TIMEOUT_SHORT" ); ok {
4255 if duration , err := time .ParseDuration (value ); err == nil {
You can’t perform that action at this time.
0 commit comments