11
11
strategy :
12
12
matrix :
13
13
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"}
15
16
]
16
17
build_type : [Release]
17
18
compiler : [{c: clang, cxx: clang++}]
@@ -59,12 +60,18 @@ jobs:
59
60
run : LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
60
61
cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc)
61
62
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'
63
68
run : |
64
- echo "SYCL_PREFER_UR=1" >> $GITHUB_ENV
65
69
echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV
66
70
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
68
75
sycl-ls
69
76
70
77
- name : Configure SYCL
73
80
-t ${{matrix.build_type}}
74
81
-o ${{github.workspace}}/sycl_build
75
82
--cmake-gen "Unix Makefiles"
76
- --ci-defaults --cuda --hip
83
+ --ci-defaults ${{matrix.adapter.config}}
77
84
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
78
85
--cmake-opt="-DSYCL_PI_TESTS=OFF"
79
86
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
91
98
- name : Swap UR loader and adapters
92
99
run : |
93
100
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/
95
102
96
103
- name : Set additional env. vars
97
104
run : |
@@ -110,7 +117,7 @@ jobs:
110
117
-GNinja
111
118
-B ${{github.workspace}}/build-e2e/
112
119
-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}} "
114
121
-DCMAKE_CXX_COMPILER="$(which clang++)"
115
122
-DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py"
116
123
0 commit comments