Skip to content

Commit dc93a36

Browse files
authored
[SYCL][E2e] Optionally allow unknown architectures in e2e (#14254)
#13976 adds support for using the `Architecture` output of `sycl-ls` when configuring `e2e` tests. This PR adds an opt-in option to allow configuring `e2e` tests when the architecture is `unknown`.
1 parent 452e746 commit dc93a36

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

sycl/test-e2e/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.20.0)
22

33
message("Configuring SYCL End-to-End Tests")
44

5+
option(SYCL_E2E_LIT_ALLOW_UNKNOWN_ARCH
6+
"Allow unknown architectures when configuring e2e tests" Off)
7+
58
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
69
project(sycl-e2e-test-suite CXX)
710
set(SYCL_TEST_E2E_STANDALONE TRUE)

sycl/test-e2e/lit.cfg.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,12 @@
753753
"Architectures for {}: {}".format(sycl_device, ", ".join(architectures))
754754
)
755755
if len(architectures) != 1 or "unknown" in architectures:
756-
lit_config.error(
757-
"Cannot detect architecture for {}\nstdout:\n{}\nstderr:\n{}".format(
758-
sycl_device, sp.stdout, sp.stderr
756+
if not config.allow_unknown_arch:
757+
lit_config.error(
758+
"Cannot detect architecture for {}\nstdout:\n{}\nstderr:\n{}".format(
759+
sycl_device, sp.stdout, sp.stderr
760+
)
759761
)
760-
)
761762
architectures = set()
762763

763764
aspect_features = set("aspect-" + a for a in aspects)

sycl/test-e2e/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ config.vulkan_lib = "@Vulkan_LIBRARY@"
4343
config.vulkan_found = "@Vulkan_FOUND@"
4444

4545
config.run_launcher = lit_config.params.get('run_launcher', "@SYCL_E2E_RUN_LAUNCHER@")
46+
config.allow_unknown_arch = "@SYCL_E2E_LIT_ALLOW_UNKNOWN_ARCH@"
4647

4748
import lit.llvm
4849
lit.llvm.initialize(lit_config, config)

0 commit comments

Comments
 (0)