@@ -20,10 +20,6 @@ class SparkRapidsTestCase(DataprocTestCase):
2020 def verify_spark_instance (self , name ):
2121 self .assert_instance_command (name , "nvidia-smi" )
2222
23- def verify_pyspark (self , name ):
24- # Verify that pyspark works
25- self .assert_instance_command (name , "echo 'from pyspark.sql import SparkSession ; SparkSession.builder.getOrCreate()' | pyspark -c spark.executor.resource.gpu.amount=1 -c spark.task.resource.gpu.amount=0.01" , 1 )
26-
2723 def verify_mig_instance (self , name ):
2824 self .assert_instance_command (name ,
2925 "/usr/bin/nvidia-smi --query-gpu=mig.mode.current --format=csv,noheader | uniq | xargs -I % test % = 'Enabled'" )
@@ -62,6 +58,12 @@ def verify_spark_job_sql(self):
6258 ("STANDARD" , ["w-0" ], GPU_T4 ))
6359 def test_spark_rapids (self , configuration , machine_suffixes , accelerator ):
6460
61+ if self .getImageOs () == "rocky" :
62+ self .skipTest ("Not supported for Rocky OS" )
63+
64+ if self .getImageVersion () <= pkg_resources .parse_version ("2.0" ):
65+ self .skipTest ("Not supported in 2.0 and earlier images" )
66+
6567 optional_components = None
6668 metadata = "gpu-driver-provider=NVIDIA,rapids-runtime=SPARK"
6769
@@ -70,10 +72,10 @@ def test_spark_rapids(self, configuration, machine_suffixes, accelerator):
7072 self .INIT_ACTIONS ,
7173 optional_components = optional_components ,
7274 metadata = metadata ,
73- machine_type = "n1-standard-32 " ,
75+ machine_type = "n1-standard-4 " ,
7476 master_accelerator = accelerator if configuration == "SINGLE" else None ,
7577 worker_accelerator = accelerator ,
76- boot_disk_size = "50GB " ,
78+ boot_disk_size = "1024GB " ,
7779 timeout_in_minutes = 30 )
7880
7981 for machine_suffix in machine_suffixes :
@@ -86,6 +88,12 @@ def test_spark_rapids(self, configuration, machine_suffixes, accelerator):
8688 ("STANDARD" , ["w-0" ], GPU_T4 ))
8789 def test_spark_rapids_sql (self , configuration , machine_suffixes , accelerator ):
8890
91+ if self .getImageOs () == "rocky" :
92+ self .skipTest ("Not supported for Rocky OS" )
93+
94+ if self .getImageVersion () <= pkg_resources .parse_version ("2.0" ):
95+ self .skipTest ("Not supported in 2.0 and earlier images" )
96+
8997 optional_components = None
9098 metadata = "gpu-driver-provider=NVIDIA,rapids-runtime=SPARK"
9199
@@ -94,10 +102,10 @@ def test_spark_rapids_sql(self, configuration, machine_suffixes, accelerator):
94102 self .INIT_ACTIONS ,
95103 optional_components = optional_components ,
96104 metadata = metadata ,
97- machine_type = "n1-standard-32 " ,
105+ machine_type = "n1-standard-4 " ,
98106 master_accelerator = accelerator if configuration == "SINGLE" else None ,
99107 worker_accelerator = accelerator ,
100- boot_disk_size = "50GB " ,
108+ boot_disk_size = "1024GB " ,
101109 timeout_in_minutes = 30 )
102110
103111 for machine_suffix in machine_suffixes :
@@ -106,24 +114,15 @@ def test_spark_rapids_sql(self, configuration, machine_suffixes, accelerator):
106114 # Only need to do this once
107115 self .verify_spark_job_sql ()
108116
109- @parameterized .parameters (
110- ("STANDARD" , ["w-0" ], GPU_T4 , "11.8.0" , "525.147.05" ),
111- ("STANDARD" , ["w-0" ], GPU_T4 , "12.0.1" , "525.147.05" ),
112- ("STANDARD" , ["w-0" ], GPU_T4 , "12.4.0" , "550.54.14" ),
113- ("STANDARD" , ["w-0" ], GPU_T4 , "12.6.2" , "560.35.03" )
114- )
117+ @parameterized .parameters (("STANDARD" , ["w-0" ], GPU_T4 , "12.4.0" , "550.54.14" ))
115118 def test_non_default_cuda_versions (self , configuration , machine_suffixes ,
116119 accelerator , cuda_version , driver_version ):
117120
118- if pkg_resources .parse_version (cuda_version ) > pkg_resources .parse_version ("12.1.1" ) \
119- and ( ( self .getImageOs () == 'ubuntu' and self .getImageVersion () <= pkg_resources .parse_version ("2.0" ) ) or \
120- ( self .getImageOs () == 'debian' and self .getImageVersion () <= pkg_resources .parse_version ("2.1" ) ) ):
121- self .skipTest ("CUDA > 12.1.1 not supported on older debian/ubuntu releases" )
121+ if self .getImageOs () == "rocky" :
122+ self .skipTest ("Not supported for Rocky OS" )
122123
123- if pkg_resources .parse_version (cuda_version ) < pkg_resources .parse_version ("12.0" ) \
124- and ( self .getImageOs () == 'debian' or self .getImageOs () == 'rocky' ) \
125- and self .getImageVersion () >= pkg_resources .parse_version ("2.2" ):
126- self .skipTest ("CUDA < 12 not supported on Debian >= 12, Rocky >= 9" )
124+ if self .getImageVersion () <= pkg_resources .parse_version ("2.0" ):
125+ self .skipTest ("Not supported in 2.0 and earlier images" )
127126
128127 metadata = ("gpu-driver-provider=NVIDIA,rapids-runtime=SPARK"
129128 ",cuda-version={0},driver-version={1}" .format (cuda_version , driver_version ))
@@ -132,10 +131,10 @@ def test_non_default_cuda_versions(self, configuration, machine_suffixes,
132131 configuration ,
133132 self .INIT_ACTIONS ,
134133 metadata = metadata ,
135- machine_type = "n1-standard-32 " ,
134+ machine_type = "n1-standard-4 " ,
136135 master_accelerator = accelerator if configuration == "SINGLE" else None ,
137136 worker_accelerator = accelerator ,
138- boot_disk_size = "50GB " ,
137+ boot_disk_size = "1024GB " ,
139138 timeout_in_minutes = 30 )
140139
141140 for machine_suffix in machine_suffixes :
0 commit comments