Skip to content

Commit ed8add4

Browse files
committed
some features were missing when using arch-based selection
1 parent c5fa726 commit ed8add4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sycl/test-e2e/format.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ def get_extra_env(sycl_devices):
368368
"linux",
369369
"windows",
370370
"preview-breaking-changes-supported",
371+
# the following entries are used by architecture-based filtering
372+
# (:arch- device, not :gpu or :cpu)
373+
"cpu",
374+
"gpu",
375+
"accelerator",
371376
]:
372377
if cond_features in test.config.available_features:
373378
conditions[cond_features] = True

sycl/test-e2e/lit.cfg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,13 @@ def get_sycl_ls_verbose(sycl_device, env):
11561156
else:
11571157
config.intel_driver_ver[full_name] = {}
11581158

1159+
# When running with a single device, merge device-specific features into global
1160+
# available_features so that %if conditionals work correctly, even if device is not :gpu or :cpu
1161+
if len(config.sycl_devices) == 1:
1162+
single_device = list(config.sycl_dev_features.keys())[0]
1163+
device_features = config.sycl_dev_features[single_device]
1164+
config.available_features.update(device_features)
1165+
11591166
if lit_config.params.get("compatibility_testing", "False") != "False":
11601167
config.substitutions.append(("%clangxx", " true "))
11611168
config.substitutions.append(("%clang", " true "))

0 commit comments

Comments
 (0)