Skip to content

Commit

Permalink
[SYCL][E2e] Optionally allow unknown architectures in e2e (#14254)
Browse files Browse the repository at this point in the history
#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`.
  • Loading branch information
PietroGhg authored Jun 22, 2024
1 parent 452e746 commit dc93a36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions sycl/test-e2e/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.20.0)

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

option(SYCL_E2E_LIT_ALLOW_UNKNOWN_ARCH
"Allow unknown architectures when configuring e2e tests" Off)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(sycl-e2e-test-suite CXX)
set(SYCL_TEST_E2E_STANDALONE TRUE)
Expand Down
9 changes: 5 additions & 4 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,12 @@
"Architectures for {}: {}".format(sycl_device, ", ".join(architectures))
)
if len(architectures) != 1 or "unknown" in architectures:
lit_config.error(
"Cannot detect architecture for {}\nstdout:\n{}\nstderr:\n{}".format(
sycl_device, sp.stdout, sp.stderr
if not config.allow_unknown_arch:
lit_config.error(
"Cannot detect architecture for {}\nstdout:\n{}\nstderr:\n{}".format(
sycl_device, sp.stdout, sp.stderr
)
)
)
architectures = set()

aspect_features = set("aspect-" + a for a in aspects)
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ config.vulkan_lib = "@Vulkan_LIBRARY@"
config.vulkan_found = "@Vulkan_FOUND@"

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

import lit.llvm
lit.llvm.initialize(lit_config, config)
Expand Down

0 comments on commit dc93a36

Please sign in to comment.