Skip to content

Commit 97f2c78

Browse files
Add options to test on L0v2
1 parent 159a2e0 commit 97f2c78

File tree

7 files changed

+77
-38
lines changed

7 files changed

+77
-38
lines changed

.github/workflows/sycl-linux-precommit.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,39 @@ jobs:
6969

7070
# Build and run native cpu e2e tests separately as cannot currently
7171
# build all the e2e tests
72-
build_run_native_cpu_e2e_tests:
73-
if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
74-
runs-on: [Linux, build]
75-
needs: [build]
76-
container:
77-
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
78-
options: -u 1001:1001
79-
steps:
80-
- uses: actions/checkout@v5
81-
with:
82-
sparse-checkout: |
83-
devops/
72+
# build_run_native_cpu_e2e_tests:
73+
# if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
74+
# runs-on: [Linux, build]
75+
# needs: [build]
76+
# container:
77+
# image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
78+
# options: -u 1001:1001
79+
# steps:
80+
# - uses: actions/checkout@v5
81+
# with:
82+
# sparse-checkout: |
83+
# devops/
8484

85-
# download build artefact
86-
- name: Download toolchain
87-
uses: actions/download-artifact@v6
88-
with:
89-
name: sycl_linux_default
90-
- name: Extract SYCL toolchain
91-
shell: bash
92-
run: |
93-
mkdir toolchain
94-
tar -xf llvm_sycl.tar.zst -C toolchain
95-
rm llvm_sycl.tar.zst
96-
- name: Build and run E2E tests
97-
uses: ./devops/actions/run-tests/e2e
98-
with:
99-
ref: ${{ inputs.ref || github.sha }}
100-
testing_mode: full
101-
target_devices: native_cpu:cpu
102-
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
103-
extra_lit_opts: --param sycl_build_targets="native_cpu"
104-
extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON
85+
# # download build artefact
86+
# - name: Download toolchain
87+
# uses: actions/download-artifact@v6
88+
# with:
89+
# name: sycl_linux_default
90+
# - name: Extract SYCL toolchain
91+
# shell: bash
92+
# run: |
93+
# mkdir toolchain
94+
# tar -xf llvm_sycl.tar.zst -C toolchain
95+
# rm llvm_sycl.tar.zst
96+
# - name: Build and run E2E tests
97+
# uses: ./devops/actions/run-tests/e2e
98+
# with:
99+
# ref: ${{ inputs.ref || github.sha }}
100+
# testing_mode: full
101+
# target_devices: native_cpu:cpu
102+
# sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
103+
# extra_lit_opts: --param sycl_build_targets="native_cpu"
104+
# extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON
105105

106106
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
107107
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
@@ -190,9 +190,10 @@ jobs:
190190
# extra_lit_opts: --param test-preview-mode=True
191191
# binaries_artifact: e2e_bin_preview
192192
- name: L0 v2
193-
runner: '["Linux", "bmg"]'
193+
runner: '["TEST_PERF"]'
194194
# runner: '["Linux", "L0v2"]'
195195
target_devices: level_zero_v2:arch-intel_gpu_mtl_u
196+
extra_lit_opts: -j 12
196197

197198
# We're in an ABI-breaking window, so these don't make sense for now.
198199
- name: ABI compatibility / sycl-rel-6_2

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,14 @@ jobs:
245245
sparse-checkout: |
246246
devops
247247
sycl/cts_exclude_filter
248+
- name: Show checkout information
249+
shell: bash
250+
run: |
251+
echo "Current branch: $(git branch --show-current)"
252+
echo "Current commit: $(git rev-parse HEAD)"
253+
echo "Current commit (short): $(git rev-parse --short HEAD)"
254+
echo "Commit message: $(git log -1 --pretty=%B)"
255+
git log -1 --oneline
248256
- name: Register cleanup after job is finished
249257
uses: ./devops/actions/cleanup
250258
- name: Reset Intel GPU

devops/actions/run-tests/e2e/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ runs:
6262
if [ -n "$CMAKE_EXTRA_ARGS" ]; then
6363
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
6464
fi
65+
- name: Check cpu
66+
shell: bash
67+
run: |
68+
lscpu
69+
lscpu | grep "Model name"
70+
6571
- name: Configure E2E tests
6672
if: inputs.testing_mode != 'run-only'
6773
shell: bash
@@ -73,7 +79,9 @@ runs:
7379
shell: bash
7480
env:
7581
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
82+
# LIT_OPTS: -j 12 -v --param "sycl_devices=level_zero_v2:arch-intel_gpu_mtl_u" sycl/test-e2e/
7683
run: |
84+
echo "LIT_OPTS: $LIT_OPTS"
7785
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
7886
# Two steps below are duplicated between Lin/Win actions, updates must change both
7987
- name: E2E logs

sycl/test-e2e/AddressSanitizer/lit.local.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ unsupported_san_flags = [
3131
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
3232
config.unsupported=True
3333

34-
config.environment["ZE_AFFINITY_MASK"] = "0"
34+
if config.ze_affinity_mask is not None:
35+
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask

sycl/test-e2e/MemorySanitizer/lit.local.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ unsupported_san_flags = [
3939
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
4040
config.unsupported=True
4141

42-
config.environment["ZE_AFFINITY_MASK"] = "0"
42+
if config.ze_affinity_mask is not None:
43+
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask

sycl/test-e2e/ThreadSanitizer/lit.local.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ unsupported_san_flags = [
3434
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
3535
config.unsupported=True
3636

37-
config.environment["ZE_AFFINITY_MASK"] = "0"
37+
if config.ze_affinity_mask is not None:
38+
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask

sycl/test-e2e/lit.cfg.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"LIBCLANG_NOTHREADS",
9797
"LIBCLANG_RESOURCE_USAGE",
9898
"LIBCLANG_CODE_COMPLETION_LOGGING",
99+
"ZE_AFFINITY_MASK",
99100
]
100101

101102
# Names of the Release and Debug versions of the XPTIFW library
@@ -917,12 +918,14 @@ def get_sycl_ls_verbose(sycl_device, env):
917918

918919
env = copy.copy(llvm_config.config.environment)
919920

921+
backend_for_selector = backend.replace("_v2", "").replace("_v1", "")
922+
920923
# Find all available devices under the backend
921-
env["ONEAPI_DEVICE_SELECTOR"] = backend + ":*"
924+
env["ONEAPI_DEVICE_SELECTOR"] = backend_for_selector + ":*"
922925

923926
detected_architectures = []
924927

925-
platform_devices = remove_level_zero_suffix(backend + ":*")
928+
platform_devices = backend_for_selector + ":*"
926929

927930
for line in get_sycl_ls_verbose(platform_devices, env).stdout.splitlines():
928931
if re.match(r" *Architecture:", line):
@@ -948,6 +951,15 @@ def get_sycl_ls_verbose(sycl_device, env):
948951

949952
config.sycl_devices = filtered_sycl_devices
950953

954+
# Determine ZE_AFFINITY_MASK for Level Zero devices.
955+
# Sanitizer tests need to set ZE_AFFINITY_MASK to a single device index
956+
config.ze_affinity_mask = None
957+
for sycl_device in remove_level_zero_suffix(config.sycl_devices):
958+
be, dev = sycl_device.split(":")
959+
if be == "level_zero" and dev.isdigit():
960+
config.ze_affinity_mask = dev
961+
break
962+
951963
for sycl_device in remove_level_zero_suffix(config.sycl_devices):
952964
be, dev = sycl_device.split(":")
953965
config.available_features.add("any-device-is-" + dev)
@@ -1114,6 +1126,13 @@ def get_sycl_ls_verbose(sycl_device, env):
11141126
features.update(device_family)
11151127

11161128
be, dev = sycl_device.split(":")
1129+
if dev.isdigit():
1130+
backend_devices = available_devices.get(be, "gpu")
1131+
if isinstance(backend_devices, tuple):
1132+
# arch-selection is typically used to select gpu device
1133+
dev = "gpu"
1134+
else:
1135+
dev = backend_devices
11171136
features.add(dev.replace("fpga", "accelerator"))
11181137
if "level_zero_v2" in full_name:
11191138
features.add("level_zero_v2_adapter")

0 commit comments

Comments
 (0)