1111 strategy :
1212 matrix :
1313 adapter : [
14- {name: CUDA}
14+ {name: CUDA, str_name: cuda, prefix: "ext_oneapi_", config: "--cuda --hip", unit: "gpu"},
15+ {name: OPENCL, str_name: opencl, prefix: "", config: "", unit: "cpu"}
1516 ]
1617 build_type : [Release]
1718 compiler : [{c: clang, cxx: clang++}]
@@ -59,12 +60,18 @@ jobs:
5960 run : LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
6061 cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc)
6162
62- - name : Set env vars & pre setup
63+ - name : Set prefer UR
64+ run : echo "SYCL_PREFER_UR=1" >> $GITHUB_ENV
65+
66+ - name : Set CUDA env vars
67+ if : matrix.adapter.name == 'CUDA'
6368 run : |
64- echo "SYCL_PREFER_UR=1" >> $GITHUB_ENV
6569 echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV
6670 echo "LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
67- source /opt/intel/oneapi/setvars.sh
71+
72+ - name : Run pre setup
73+ run : |
74+ source /opt/intel/oneapi/setvars.sh --force
6875 sycl-ls
6976
7077 - name : Configure SYCL
7380 -t ${{matrix.build_type}}
7481 -o ${{github.workspace}}/sycl_build
7582 --cmake-gen "Unix Makefiles"
76- --ci-defaults --cuda --hip
83+ --ci-defaults ${{matrix.adapter.config}}
7784 --cmake-opt="-DLLVM_INSTALL_UTILS=ON"
7885 --cmake-opt="-DSYCL_PI_TESTS=OFF"
7986 --cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
9198 - name : Swap UR loader and adapters
9299 run : |
93100 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/
101+ cp ${{github.workspace}}/ur-repo/build/lib/libur_adapter_${{matrix.adapter.str_name}} .so* ${{github.workspace}}/sycl_build/lib/
95102
96103 - name : Set additional env. vars
97104 run : |
@@ -110,7 +117,7 @@ jobs:
110117 -GNinja
111118 -B ${{github.workspace}}/build-e2e/
112119 -S ${{github.workspace}}/sycl-repo/sycl/test-e2e/
113- -DSYCL_TEST_E2E_TARGETS="ext_oneapi_cuda:gpu "
120+ -DSYCL_TEST_E2E_TARGETS="${{matrix.adapter.prefix}}${{matrix.adapter.str_name}}:${{matrix.adapter.unit}} "
114121 -DCMAKE_CXX_COMPILER="$(which clang++)"
115122 -DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py"
116123
0 commit comments