26
26
required : false
27
27
type : string
28
28
default : OFF
29
+ docker_image :
30
+ required : true
31
+ type : string
32
+ default : " "
33
+ image_options :
34
+ required : true
35
+ type : string
36
+ default : " "
29
37
workflow_dispatch :
30
38
inputs :
31
39
adapter_name :
51
59
required : false
52
60
type : string
53
61
default : OFF
62
+ docker_image :
63
+ required : true
64
+ type : string
65
+ default : " "
66
+ image_options :
67
+ required : true
68
+ type : string
69
+ default : " "
54
70
55
- permissions :
56
- contents : read
71
+ permissions : read-all
57
72
58
73
env :
59
74
UR_LOG_CUDA : " level:error;flush:error"
83
98
compiler : [{c: gcc, cxx: g++}]
84
99
85
100
runs-on : ${{inputs.runner_name}}
101
+ container :
102
+ image : ${{ inputs.docker_image }}
103
+ options : ${{ inputs.image_options }}
86
104
87
105
steps :
88
106
# TODO:
@@ -94,9 +112,15 @@ jobs:
94
112
- name : Checkout LLVM
95
113
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
96
114
97
- # Latest distros do not allow global pip installation
115
+ # for some reason it's required to re-configure python for venv to work properly.
116
+ - name : Set up Python 3.12
117
+ if : ${{ inputs.docker_image == 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps' }}
118
+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
119
+ with :
120
+ python-version : ' 3.12'
121
+
98
122
- name : Install UR python dependencies in venv
99
- working-directory : ${{github.workspace}} /unified-runtime
123
+ working-directory : . /unified-runtime
100
124
run : |
101
125
python3 -m venv .venv
102
126
. .venv/bin/activate
@@ -106,16 +130,25 @@ jobs:
106
130
107
131
- name : Download DPC++
108
132
run : |
109
- wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
110
- mkdir dpcpp_compiler
111
- tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
133
+ wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
134
+ mkdir -p dpcpp_compiler
135
+ tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler
136
+
137
+ - name : Install OpenCL
138
+ if : ${{ inputs.adapter_name == 'OPENCL' }}
139
+ run : |
140
+ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
141
+ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
142
+ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
143
+ sudo apt-get update
144
+ sudo apt-get install -y intel-oneapi-runtime-opencl
112
145
113
146
- name : Configure Unified Runtime project
114
- working-directory : ${{github.workspace}}/unified-runtime
115
147
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
116
148
run : >
117
149
cmake
118
- -B${{github.workspace}}/build
150
+ -S unified-runtime
151
+ -B build
119
152
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
120
153
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
121
154
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -127,32 +160,32 @@ jobs:
127
160
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
128
161
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
129
162
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
130
- -DUR_DPCXX=${{github.workspace}} /dpcpp_compiler/bin/clang++
131
- -DUR_SYCL_LIBRARY_DIR=${{github.workspace}} /dpcpp_compiler/lib
132
- -DCMAKE_INSTALL_PREFIX=${{github.workspace}} /install
163
+ -DUR_DPCXX=. /dpcpp_compiler/bin/clang++
164
+ -DUR_SYCL_LIBRARY_DIR=. /dpcpp_compiler/lib
165
+ -DCMAKE_INSTALL_PREFIX=. /install
133
166
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
134
167
${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
135
168
136
169
- name : Build
137
170
# This is so that device binaries can find the sycl runtime library
138
- run : cmake --build ${{github.workspace}}/ build -j $(nproc)
171
+ run : cmake --build build -j $(nproc)
139
172
140
173
- name : Install
141
174
# This is to check that install command does not fail
142
- run : cmake --install ${{github.workspace}}/ build
175
+ run : cmake --install build
143
176
144
177
- name : Test adapter specific
145
178
env :
146
179
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
147
- run : ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/ build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
180
+ run : ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
148
181
# Don't run adapter specific tests when building multiple adapters
149
182
if : ${{ matrix.adapter.other_name == '' }}
150
183
151
184
- name : Test adapters
152
185
env :
153
186
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
154
- run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/ build --output-on-failure -L "conformance" --timeout 600 -VV
187
+ run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600 -VV
155
188
156
189
- name : Get information about platform
157
190
if : ${{ always() }}
158
- run : ${{github.workspace}} /unified-runtime/.github/scripts/get_system_info.sh
191
+ run : . /unified-runtime/.github/scripts/get_system_info.sh
0 commit comments