Skip to content

Commit a8e8b4e

Browse files
authored
[SYCL][E2E] Initialize arch_flag to an empty string by default (#16200)
In an environment with no devices this variable is never set, causing a confusing error when we try to define the `clangxx` expansion. Here we set it to an empty string by default so that instead of exiting with a python error we report all tests as unsupported (due to having no devices). This same issue is why `arch_flag` was set in build-only mode, so I removed the line that did that too.
1 parent a9781dd commit a8e8b4e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
case "build-only":
4646
config.test_mode = "build-only"
4747
config.sycl_devices = []
48-
arch_flag = ""
4948
case "full":
5049
config.test_mode = "full"
5150
config.available_features.add("run-mode")
@@ -657,6 +656,8 @@ def open_check_file(file_name):
657656
# discovered already.
658657
config.sycl_dev_features = {}
659658

659+
# Architecture flag for compiling for AMD HIP devices. Empty otherwise.
660+
arch_flag = ""
660661
# Version of the driver for a given device. Empty for non-Intel devices.
661662
config.intel_driver_ver = {}
662663
for sycl_device in config.sycl_devices:
@@ -798,9 +799,6 @@ def open_check_file(file_name):
798799
)
799800
elif be == "hip" and config.hip_platform == "NVIDIA":
800801
config.available_features.add("hip_nvidia")
801-
arch_flag = ""
802-
else:
803-
arch_flag = ""
804802

805803
config.sycl_dev_features[sycl_device] = features.union(config.available_features)
806804
if is_intel_driver:

0 commit comments

Comments
 (0)