@@ -104,7 +104,7 @@ jobs:
104104 - name : Generate source from spec, check for uncommitted diff
105105 if : matrix.os == 'ubuntu-22.04'
106106 run : cmake --build ${{github.workspace}}/build --target check-generated
107-
107+
108108 - name : Verify that each source file contains a license
109109 run : cmake --build ${{github.workspace}}/build --target verify-licenses
110110
@@ -160,127 +160,41 @@ jobs:
160160 working-directory : ${{github.workspace}}/build
161161 run : ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short" --verbose
162162
163- adapter-build-hw :
164- name : Build - Adapters on HW
165- if : github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
166- strategy :
167- matrix :
168- adapter : [
169- {name: CUDA, platform: ""},
170- {name: HIP, platform: ""},
171- {name: L0, platform: ""},
172- {name: OPENCL, platform: "Intel(R) OpenCL"},
173- {name: NATIVE_CPU, platform: ""}
174- ]
175- build_type : [Debug, Release]
176- compiler : [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
177- # TODO: The latest L0 loader segfaults when built with clang.
178- exclude :
179- - adapter : {name: L0, platform: ""}
180- compiler : {c: clang, cxx: clang++}
181-
182- runs-on : ${{matrix.adapter.name}}
183-
184- steps :
185- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
186-
187- - name : Install pip packages
188- run : pip install -r third_party/requirements.txt
189-
190- - name : Download DPC++
191- run : |
192- wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz
193- mkdir dpcpp_compiler
194- tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
195-
196- - name : Configure CMake
197- run : >
198- cmake
199- -B${{github.workspace}}/build
200- -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
201- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
202- -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
203- -DUR_ENABLE_TRACING=ON
204- -DUR_DEVELOPER_MODE=ON
205- -DUR_BUILD_TESTS=ON
206- -DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
207- -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
208- -DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
209- ${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
210- ${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
211-
212- - name : Build
213- # This is so that device binaries can find the sycl runtime library
214- run : cmake --build ${{github.workspace}}/build -j $(nproc)
215-
216- - name : Test adapter specific
217- working-directory : ${{github.workspace}}/build
218- run : ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180
219-
220- - name : Test adapters
221- working-directory : ${{github.workspace}}/build
222- run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
223-
224- - name : Get information about platform
225- if : ${{ always() }}
226- run : .github/scripts/get_system_info.sh
227-
228- examples-build-hw :
229- name : Build - examples on HW
230- # if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
231- if : false # temporaily disabled due to conda env setup issues
232- strategy :
233- matrix :
234- adapter : [
235- {name: L0}
236- ]
237- build_type : [Debug, Release]
238- compiler : [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
239-
240- runs-on : ${{matrix.adapter.name}}
241-
242- steps :
243- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
244-
245- - name : Install pip packages
246- run : pip install -r third_party/requirements.txt
247-
248- - name : Init conda env
249- uses : conda-incubator/setup-miniconda@9f54435e0e72c53962ee863144e47a4b094bfd35 # v2.3.0
250- with :
251- miniconda-version : " latest"
252- activate-environment : examples
253- environment-file : third_party/deps.yml
254- auto-activate-base : false
255-
256- - name : Configure CMake
257- shell : bash -el {0}
258- run : >
259- cmake
260- -B${{github.workspace}}/build
261- -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
262- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
263- -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
264- -DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
265- -DUR_BUILD_EXAMPLE_CODEGEN=ON
266- -DUR_DEVELOPER_MODE=ON
267-
268- - name : Build
269- run : cmake --build ${{github.workspace}}/build -j $(nproc)
270-
271- - name : Test codegen example
272- working-directory : ${{github.workspace}}/build
273- run : bin/codegen
274-
275- # conda init adds content to user's profile making it failing (if conda is gone)
276- - name : Cleanup after conda init
277- run : |
278- cat ${HOME}/.profile || true
279- rm ${HOME}/.profile || true
280-
281- - name : Get information about platform
282- if : ${{ always() }}
283- run : .github/scripts/get_system_info.sh
163+ level-zero :
164+ if : github.repository == 'oneapi-src/unified-runtime'
165+ name : Level Zero
166+ uses : ./.github/workflows/build-hw-reusable.yml
167+ with :
168+ name : L0
169+
170+ opencl :
171+ if : github.repository == 'oneapi-src/unified-runtime'
172+ name : OpenCL
173+ uses : ./.github/workflows/build-hw-reusable.yml
174+ with :
175+ name : OPENCL
176+ platform : " Intel(R) OpenCL"
177+
178+ cuda :
179+ if : github.repository == 'oneapi-src/unified-runtime'
180+ name : CUDA
181+ uses : ./.github/workflows/build-hw-reusable.yml
182+ with :
183+ name : CUDA
184+
185+ hip :
186+ if : github.repository == 'oneapi-src/unified-runtime'
187+ name : HIP
188+ uses : ./.github/workflows/build-hw-reusable.yml
189+ with :
190+ name : HIP
191+
192+ native-cpu :
193+ if : github.repository == 'oneapi-src/unified-runtime'
194+ name : Native CPU
195+ uses : ./.github/workflows/build-hw-reusable.yml
196+ with :
197+ name : NATIVE_CPU
284198
285199 windows-build :
286200 name : Build - Windows
0 commit comments