Skip to content

Commit 0a6adea

Browse files
[SYCL][Test E2E] Changes to sycl_be canonicalization (#9440)
1) Remove very old PI_ABC_XYZ -> abx_xyz translation 2) Make remaining canonicalizations earlier before first use
1 parent f0f3613 commit 0a6adea

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@
4242
'LIBCLANG_BGPRIO_EDIT', 'LIBCLANG_NOTHREADS',
4343
'LIBCLANG_RESOURCE_USAGE',
4444
'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+
4559
# Clang/Win32 may refer to %INCLUDE%. vsvarsall.bat sets it.
4660
if platform.system() != 'Windows':
4761
possibly_dangerous_env_vars.append('INCLUDE')
@@ -257,25 +271,6 @@
257271

258272
config.substitutions.append( ('%gpu_aot_target_opts', config.gpu_aot_target_opts ) )
259273

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-
279274
# Use short names for LIT rules
280275
config.available_features.add(config.sycl_be.replace('ext_intel_', '').replace('ext_oneapi_', ''))
281276

0 commit comments

Comments
 (0)