|
176 | 176 | config.sycl_be = config.sycl_be[3:]
|
177 | 177 | config.sycl_be = config.sycl_be.lower()
|
178 | 178 |
|
| 179 | +# Replace deprecated backend names |
| 180 | +deprecated_names_mapping = {'cuda' : 'ext_oneapi_cuda', |
| 181 | + 'hip' : 'ext_oneapi_hip', |
| 182 | + 'level_zero' : 'ext_oneapi_level_zero', |
| 183 | + 'esimd_cpu' : 'ext_intel_esimd_emulator'} |
| 184 | +if config.sycl_be in deprecated_names_mapping.keys(): |
| 185 | + config.sycl_be = deprecated_names_mapping[config.sycl_be] |
| 186 | + |
179 | 187 | lit_config.note("Backend: {BACKEND}".format(BACKEND=config.sycl_be))
|
180 | 188 |
|
181 | 189 | config.substitutions.append( ('%sycl_be', config.sycl_be) )
|
182 |
| -config.available_features.add(config.sycl_be) |
| 190 | +# Use short names for LIT rules |
| 191 | +config.available_features.add(config.sycl_be.replace('ext_intel_', '').replace('ext_oneapi_', '')) |
183 | 192 | config.substitutions.append( ('%BE_RUN_PLACEHOLDER', "env SYCL_DEVICE_FILTER={SYCL_PLUGIN} ".format(SYCL_PLUGIN=config.sycl_be)) )
|
184 | 193 |
|
185 | 194 | if config.dump_ir_supported:
|
186 | 195 | config.available_features.add('dump_ir')
|
187 | 196 |
|
188 | 197 | supported_sycl_be = ['host',
|
189 | 198 | 'opencl',
|
190 |
| - 'cuda', |
191 |
| - 'hip', |
192 |
| - 'level_zero'] |
| 199 | + 'ext_oneapi_cuda', |
| 200 | + 'ext_oneapi_hip', |
| 201 | + 'ext_oneapi_level_zero', |
| 202 | + 'ext_intel_esimd_emulator'] |
193 | 203 |
|
194 | 204 | if config.sycl_be not in supported_sycl_be:
|
195 | 205 | lit_config.error("Unknown SYCL BE specified '" +
|
196 | 206 | config.sycl_be +
|
197 | 207 | "'. Supported values are {}".format(', '.join(supported_sycl_be)))
|
198 | 208 |
|
| 209 | +# Run only tests in ESIMD subforlder for the ext_intel_esimd_emulator |
| 210 | +if config.sycl_be == 'ext_intel_esimd_emulator': |
| 211 | + config.test_source_root += "/ESIMD" |
| 212 | + config.test_exec_root += "/ESIMD" |
| 213 | + |
199 | 214 | # If HIP_PLATFORM flag is not set, default to AMD, and check if HIP platform is supported
|
200 | 215 | supported_hip_platforms=["AMD", "NVIDIA"]
|
201 | 216 | if config.hip_platform == "":
|
202 | 217 | config.hip_platform = "AMD"
|
203 | 218 | if config.hip_platform not in supported_hip_platforms:
|
204 | 219 | lit_config.error("Unknown HIP platform '" + config.hip_platform + "' supported platforms are " + ', '.join(supported_hip_platforms))
|
205 | 220 |
|
206 |
| -if config.sycl_be == "hip" and config.hip_platform == "AMD": |
| 221 | +if config.sycl_be == "ext_oneapi_hip" and config.hip_platform == "AMD": |
207 | 222 | config.available_features.add('hip_amd')
|
208 | 223 | arch_flag = '-Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=' + config.amd_arch
|
209 |
| -elif config.sycl_be == "hip" and config.hip_platform == "NVIDIA": |
| 224 | +elif config.sycl_be == "ext_oneapi_hip" and config.hip_platform == "NVIDIA": |
210 | 225 | config.available_features.add('hip_nvidia')
|
211 | 226 | arch_flag = ""
|
212 | 227 | else:
|
|
300 | 315 | gpu_check_substitute = "| FileCheck %s"
|
301 | 316 | config.available_features.add('gpu')
|
302 | 317 |
|
303 |
| - if config.sycl_be == "level_zero": |
| 318 | + if config.sycl_be == "ext_oneapi_level_zero": |
304 | 319 | gpu_l0_check_substitute = "| FileCheck %s"
|
305 | 320 | if lit_config.params.get('ze_debug'):
|
306 | 321 | gpu_run_substitute = " env ZE_DEBUG={ZE_DEBUG} SYCL_DEVICE_FILTER=level_zero:gpu,host ".format(ZE_DEBUG=config.ze_debug)
|
|
310 | 325 | gpu_run_on_linux_substitute = "env SYCL_DEVICE_FILTER={SYCL_PLUGIN}:gpu,host ".format(SYCL_PLUGIN=config.sycl_be)
|
311 | 326 | gpu_check_on_linux_substitute = "| FileCheck %s"
|
312 | 327 |
|
313 |
| - if config.sycl_be == "cuda": |
| 328 | + if config.sycl_be == "ext_oneapi_cuda": |
314 | 329 | gpu_run_substitute += "SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT=1 "
|
315 | 330 |
|
316 | 331 | else:
|
|
335 | 350 | config.substitutions.append( ('%ACC_RUN_PLACEHOLDER', acc_run_substitute) )
|
336 | 351 | config.substitutions.append( ('%ACC_CHECK_PLACEHOLDER', acc_check_substitute) )
|
337 | 352 |
|
338 |
| -if config.sycl_be == 'cuda' or (config.sycl_be == 'hip' and config.hip_platform == 'NVIDIA'): |
| 353 | +if config.sycl_be == 'ext_oneapi_cuda' or (config.sycl_be == 'ext_oneapi_hip' and config.hip_platform == 'NVIDIA'): |
339 | 354 | config.substitutions.append( ('%sycl_triple', "nvptx64-nvidia-cuda" ) )
|
340 |
| -elif config.sycl_be == 'hip' and config.hip_platform == 'AMD': |
| 355 | +elif config.sycl_be == 'ext_oneapi_hip' and config.hip_platform == 'AMD': |
341 | 356 | config.substitutions.append( ('%sycl_triple', "amdgcn-amd-amdhsa" ) )
|
342 | 357 | else:
|
343 | 358 | config.substitutions.append( ('%sycl_triple', "spir64" ) )
|
|
0 commit comments