Skip to content

Commit eb9e8c2

Browse files
authored
Merge pull request #949 from wlemkows/e2e-cuda-nightly
[UR][E2E][CUDA] Add E2E Cuda nightly workflow
2 parents 84d656b + c88c0e3 commit eb9e8c2

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

.github/workflows/e2e_nightly.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: E2E Nightly
2+
3+
on:
4+
schedule:
5+
# Run every day at 23:00 UTC
6+
- cron: '0 23 * * *'
7+
8+
jobs:
9+
e2e-build-hw:
10+
name: Build SYCL, UR, run E2E
11+
strategy:
12+
matrix:
13+
adapter: [
14+
{name: CUDA}
15+
]
16+
build_type: [Release]
17+
compiler: [{c: clang, cxx: clang++}]
18+
19+
runs-on: ${{matrix.adapter.name}}
20+
21+
steps:
22+
- name: Checkout UR
23+
uses: actions/checkout@v4
24+
with:
25+
ref: adapters
26+
path: ur-repo
27+
28+
- name: Checkout SYCL
29+
uses: actions/checkout@v4
30+
with:
31+
repository: intel/llvm
32+
ref: sycl
33+
path: sycl-repo
34+
35+
- name: Install pip packages
36+
working-directory: ${{github.workspace}}/ur-repo
37+
run: pip install -r third_party/requirements.txt
38+
39+
- name: Download DPC++
40+
run: |
41+
wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2023-09-21/sycl_linux.tar.gz
42+
mkdir dpcpp_compiler
43+
tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler
44+
45+
- name: Configure CMake UR
46+
working-directory: ${{github.workspace}}/ur-repo
47+
run: >
48+
cmake
49+
-B build
50+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
51+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
52+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
53+
-DUR_ENABLE_TRACING=ON
54+
-DUR_DEVELOPER_MODE=ON
55+
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
56+
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
57+
58+
- name: Build UR
59+
run: LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
60+
cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc)
61+
62+
- name: Set env vars & pre setup
63+
run: |
64+
echo "SYCL_PREFER_UR=1" >> $GITHUB_ENV
65+
echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV
66+
echo "LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
67+
source /opt/intel/oneapi/setvars.sh
68+
sycl-ls
69+
70+
- name: Configure SYCL
71+
run: >
72+
python3 sycl-repo/buildbot/configure.py
73+
-t ${{matrix.build_type}}
74+
-o ${{github.workspace}}/sycl_build
75+
--cmake-gen "Unix Makefiles"
76+
--ci-defaults --cuda --hip
77+
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
78+
--cmake-opt="-DSYCL_PI_TESTS=OFF"
79+
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
80+
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
81+
82+
- name: Build SYCL
83+
run: cmake --build ${{github.workspace}}/sycl_build
84+
85+
- name: Run check-sycl
86+
# Remove after fixing SYCL test :: abi/layout_handler.cpp
87+
# This issue does not affect further execution of e2e with UR.
88+
continue-on-error: true
89+
run: cmake --build ${{github.workspace}}/sycl_build --target check-sycl
90+
91+
- name: Swap UR loader and adapters
92+
run: |
93+
cp ${{github.workspace}}/ur-repo/build/lib/libur_loader.so* ${{github.workspace}}/sycl_build/lib/
94+
cp ${{github.workspace}}/ur-repo/build/lib/libur_adapter_cuda.so* ${{github.workspace}}/sycl_build/lib/
95+
96+
- name: Setup SYCL
97+
run: |
98+
echo "${{github.workspace}}/sycl_build/bin" >> $GITHUB_PATH
99+
echo "LD_LIBRARY_PATH=${{github.workspace}}/sycl_build/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
100+
which clang++ sycl-ls
101+
SYCL_PI_TRACE=-1 sycl-ls
102+
103+
- name: Build e2e tests
104+
run: >
105+
cmake
106+
-GNinja
107+
-B ${{github.workspace}}/build-e2e/
108+
-S ${{github.workspace}}/sycl-repo/sycl/test-e2e/
109+
-DSYCL_TEST_E2E_TARGETS="ext_oneapi_cuda:gpu"
110+
-DCMAKE_CXX_COMPILER="$(which clang++)"
111+
-DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py"
112+
113+
- name: Run e2e tests
114+
run: ninja -C build-e2e check-sycl-e2e
115+
116+
# Workspace on self-hosted runners is not cleaned automatically.
117+
# We have to delete the files created outside of using actions.
118+
- name: Cleanup self-hosted workspace
119+
if: always()
120+
run: |
121+
ls -la ./
122+
rm -rf ./* || true

0 commit comments

Comments
 (0)