Skip to content

Commit b01a8d0

Browse files
[CI] Fix nightly SYCL build
Paths of some tests have changed. Also, we should download SYCL repo that matches the compiled version.
1 parent fc7b481 commit b01a8d0

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/reusable_sycl.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
llvm_tag: ["latest", "nightly-2025-03-15"] # "latest" or llvm with UMF v0.11.0-dev4
2121

2222
steps:
23-
# Install sycl
23+
# 1. Install sycl
2424
- name: Clean up
2525
if: always()
2626
run: rm -rf llvm sycl_linux.tar.gz
@@ -48,7 +48,7 @@ jobs:
4848
echo "${{ github.workspace }}/llvm/bin" >> $GITHUB_PATH
4949
echo "LD_LIBRARY_PATH=${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
5050
51-
# Install UMF
51+
# 2. Install UMF
5252
- name: Checkout UMF
5353
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5454
with:
@@ -75,37 +75,43 @@ jobs:
7575
- name: Print installed lib files
7676
run: ls -l llvm/lib
7777

78-
# Test sycl-ls
78+
# 3. Test sycl-ls
7979
- name: Run sycl-ls
8080
env:
8181
SYCL_UR_TRACE: 1
8282
run: |
83+
which clang++
84+
which sycl-ls
8385
./llvm/bin/sycl-ls | tee sycl-ls-output.log
8486
grep -q "level_zero:gpu" sycl-ls-output.log
8587
86-
# Test several sycl e2e test
87-
# These are arbitrarily picked tests to check the compatibility
88-
# Note that some intel/llvm tests may be flaky, although I haven't noticed such a behavior in the following tests
88+
# 4. Test several sycl e2e test
89+
# Arbitrarily picked tests to check the compatibility. Note that some intel/llvm tests may be flaky
90+
# Checkout the repo in the version that matches the downloaded version
8991
- name: Checkout sycl
9092
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9193
with:
9294
repository: intel/llvm
9395
path: sycl_repo
9496
fetch-depth: 1
95-
ref: sycl
97+
ref: ${{ matrix.llvm_tag == 'latest' && 'sycl' || matrix.llvm_tag }}
9698

9799
- name: Create sycl tests build directory
98100
run: |
99101
TESTS_BUILD_DIR=${{ github.workspace }}/sycl_repo/sycl/test-e2e/build
100102
mkdir $TESTS_BUILD_DIR
101103
echo "TESTS_BUILD_DIR=$TESTS_BUILD_DIR" >> $GITHUB_ENV
102104
105+
# Paths of some tests have changed in the latest llvm release
106+
# TODO: when new tagged SYCL version is used (and it's later than 23.04) - remove the extra test paths
103107
- name: Build sycl e2e tests
104108
working-directory: sycl_repo
105109
run: |
106110
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/AbiNeutral/submit-kernel.cpp -o ${{env.TESTS_BUILD_DIR}}/submit-kernel -Iinclude
107-
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/interop-l0-direct.cpp -o ${{env.TESTS_BUILD_DIR}}/interop-l0-direct -lze_loader -Iinclude
108-
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/level_zero_interop_memcpy.cpp -o ${{env.TESTS_BUILD_DIR}}/level_zero_interop_memcpy -Iinclude
111+
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/level_zero/interop-direct.cpp -o ${{env.TESTS_BUILD_DIR}}/l0-interop-direct -lze_loader -Iinclude || \
112+
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/interop-l0-direct.cpp -o ${{env.TESTS_BUILD_DIR}}/interop-l0-direct -lze_loader -Iinclude
113+
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/level_zero/interop_memcpy.cpp -o ${{env.TESTS_BUILD_DIR}}/l0-interop-memcpy -Iinclude || \
114+
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Adapters/level_zero_interop_memcpy.cpp -o ${{env.TESTS_BUILD_DIR}}/level_zero_interop_memcpy -Iinclude
109115
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/Basic/build_log.cpp -o ${{env.TESTS_BUILD_DIR}}/build_log -Iinclude
110116
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/PerformanceTests/ParallelFor/parallel_for_range_roundup.cpp -fsycl-range-rounding=force -o ${{env.TESTS_BUILD_DIR}}/parallel_for_range_roundup -Iinclude
111117
${{github.workspace}}/llvm/bin/clang++ -fsycl sycl/test-e2e/USM/fill_any_size.cpp -o ${{env.TESTS_BUILD_DIR}}/fill_any_size -Iinclude
@@ -116,9 +122,9 @@ jobs:
116122
UMF_LOG: "level:debug;flush:debug;output:stdout;pid:yes"
117123
working-directory: ${{env.TESTS_BUILD_DIR}}
118124
run: |
119-
echo "---Run submit-kernel test" && ./submit-kernel
120-
echo "---Run interop-l0-direct test" && ./interop-l0-direct
121-
echo "---Run level_zero_interop_memcpy test" && ./level_zero_interop_memcpy
122-
echo "---Run build_log test" && ./build_log
123-
echo "---Run parallel_for_range_roundup test" && ./parallel_for_range_roundup
124-
echo "---Run fill_any_size test" && ./fill_any_size
125+
for test in ./*; do
126+
if [ -x "$test" ] && [ ! -d "$test" ]; then
127+
echo "### Running test: $test"
128+
"$test"
129+
fi
130+
done

0 commit comments

Comments
 (0)