|
42 | 42 | 'LIBCLANG_BGPRIO_EDIT', 'LIBCLANG_NOTHREADS',
|
43 | 43 | 'LIBCLANG_RESOURCE_USAGE',
|
44 | 44 | 'LIBCLANG_CODE_COMPLETION_LOGGING']
|
| 45 | + |
| 46 | +if not config.sycl_be: |
| 47 | + lit_config.error("SYCL backend is not specified") |
| 48 | + |
| 49 | +# Replace deprecated backend names |
| 50 | +deprecated_names_mapping = {'cuda' : 'ext_oneapi_cuda', |
| 51 | + 'hip' : 'ext_oneapi_hip', |
| 52 | + 'level_zero' : 'ext_oneapi_level_zero', |
| 53 | + 'esimd_cpu' : 'ext_intel_esimd_emulator'} |
| 54 | +if config.sycl_be in deprecated_names_mapping.keys(): |
| 55 | + config.sycl_be = deprecated_names_mapping[config.sycl_be] |
| 56 | + |
| 57 | +lit_config.note("Backend: {BACKEND}".format(BACKEND=config.sycl_be)) |
| 58 | + |
45 | 59 | # Clang/Win32 may refer to %INCLUDE%. vsvarsall.bat sets it.
|
46 | 60 | if platform.system() != 'Windows':
|
47 | 61 | possibly_dangerous_env_vars.append('INCLUDE')
|
|
257 | 271 |
|
258 | 272 | config.substitutions.append( ('%gpu_aot_target_opts', config.gpu_aot_target_opts ) )
|
259 | 273 |
|
260 |
| -if not config.sycl_be: |
261 |
| - lit_config.error("SYCL backend is not specified") |
262 |
| - |
263 |
| -# Transforming from SYCL_BE backend definition style to SYCL_DEVICE_FILTER used |
264 |
| -# for backward compatibility : e.g. 'PI_ABC_XYZ' -> 'abc_xyz' |
265 |
| -if config.sycl_be.startswith("PI_"): |
266 |
| - config.sycl_be = config.sycl_be[3:] |
267 |
| -config.sycl_be = config.sycl_be.lower() |
268 |
| - |
269 |
| -# Replace deprecated backend names |
270 |
| -deprecated_names_mapping = {'cuda' : 'ext_oneapi_cuda', |
271 |
| - 'hip' : 'ext_oneapi_hip', |
272 |
| - 'level_zero' : 'ext_oneapi_level_zero', |
273 |
| - 'esimd_cpu' : 'ext_intel_esimd_emulator'} |
274 |
| -if config.sycl_be in deprecated_names_mapping.keys(): |
275 |
| - config.sycl_be = deprecated_names_mapping[config.sycl_be] |
276 |
| - |
277 |
| -lit_config.note("Backend: {BACKEND}".format(BACKEND=config.sycl_be)) |
278 |
| - |
279 | 274 | # Use short names for LIT rules
|
280 | 275 | config.available_features.add(config.sycl_be.replace('ext_intel_', '').replace('ext_oneapi_', ''))
|
281 | 276 |
|
|
0 commit comments