Skip to content

[SYCL] Add sycl-jit e2e feature #19724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: sycl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{l0_leak_check} %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{l0_leak_check} %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// target. Don't run eviction check for CUDA/HIP, so that we don't have to find
// a magic number that works for all binaries (and by definition is flaky).

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// DEFINE: %{cache_vars} = env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_TRACE=7 SYCL_CACHE_DIR=%t/cache_dir
// DEFINE: %{max_cache_size} = SYCL_CACHE_MAX_SIZE=30000
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_cache_pm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: (opencl || level_zero)
// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// -- Test the kernel_compiler with SYCL source.
// RUN: %{build} -o %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_device_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// UNSUPPORTED: opencl && gpu
// UNSUPPORTED-TRACKER: GSD-4287
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_imf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations
// REQUIRES: (opencl || level_zero)

// UNSUPPORTED: accelerator
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_include_paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{run} %t.out %S | FileCheck %s --check-prefixes=CHECK,CHECK-NOCWD
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_shared_allocations
// REQUIRES: sycl-jit, aspect-usm_shared_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_lifetimes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} env SYCL_UR_TRACE=-1 %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_namespaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{l0_leak_check} %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_overload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: aspect-usm_device_allocations
// REQUIRES: sycl-jit, aspect-usm_device_allocations

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{l0_leak_check} %{run} %t.out
Expand Down
2 changes: 2 additions & 0 deletions sycl/test-e2e/KernelCompiler/sycl_time_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: sycl-jit

// RUN: %{build} -o %t.out
// RUN: %if hip %{ env SYCL_JIT_AMDGCN_PTX_TARGET_CPU=%{amd_arch} %} %{run} %t.out | FileCheck %s

Expand Down
13 changes: 13 additions & 0 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,19 @@ def get_sycl_ls_verbose(sycl_device, env):
config.available_features.add("device-config-file")
config.substitutions.append(("%device_config_file_include_flag", ""))

# Check for sycl-jit library
if config.test_mode != "build-only":
if platform.system() == "Linux":
if os.path.exists(os.path.join(config.sycl_libs_dir, "libsycl-jit.so")):
config.available_features.add("sycl-jit")
elif platform.system() == "Windows":
if os.path.exists(os.path.join(config.dpcpp_bin_dir, "sycl-jit.dll")):
config.available_features.add("sycl-jit")
if "sycl-jit" not in config.available_features:
lit_config.note(
"sycl-jit was not found. Tests requiring sycl-jit will be skipped."
)

# That has to be executed last so that all device-independent features have been
# discovered already.
config.sycl_dev_features = {}
Expand Down
Loading