Skip to content

Commit d005408

Browse files
committed
Merge branch 'main' into fix-bindless-L0-copy
2 parents 721af5d + 056d653 commit d005408

File tree

182 files changed

+5064
-1717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+5064
-1717
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[*]
22
indent_style = space
33
indent_size = 4
4+
5+
[.github/workflows/*.yml]
6+
indent_size = 2

.github/CODEOWNERS

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33
# Level Zero adapter
44
source/adapters/level_zero @oneapi-src/unified-runtime-level-zero-write
5+
test/adapters/level_zero @oneapi-src/unified-runtime-level-zero-write
56

67
# CUDA and HIP adapters
78
source/adapters/cuda @oneapi-src/unified-runtime-cuda-write
9+
test/adapters/cuda @oneapi-src/unified-runtime-cuda-write
810
source/adapters/hip @oneapi-src/unified-runtime-hip-write
11+
test/adapters/hip @oneapi-src/unified-runtime-hip-write
912

1013
# OpenCL adapter
1114
source/adapters/opencl @oneapi-src/unified-runtime-opencl-write
15+
test/adapters/opencl @oneapi-src/unified-runtime-opencl-write
1216

1317
# Native CPU adapter
1418
source/adapters/native_cpu @oneapi-src/unified-runtime-native-cpu-write
19+
test/adapters/native_cpu @oneapi-src/unified-runtime-native-cpu-write
1520

1621
# Command-buffer experimental feature
1722
source/adapters/**/command_buffer.* @oneapi-src/unified-runtime-command-buffer-write
@@ -20,6 +25,7 @@ scripts/core/exp-command-buffer.yml @oneapi-src/unified-runtime-command-buff
2025
test/conformance/exp_command_buffer** @oneapi-src/unified-runtime-command-buffer-write
2126

2227
# Bindless Images experimental feature
23-
scripts/core/EXP-BINDLESS-IMAGES.rst @oneapi-src/unified-runtime-bindless-images-write
24-
scripts/core/exp-bindless-images.yml @oneapi-src/unified-runtime-bindless-images-write
25-
source/adapters/**/image.* @oneapi-src/unified-runtime-bindless-images-write
28+
source/adapters/**/image.* @oneapi-src/unified-runtime-bindless-images-write
29+
scripts/core/EXP-BINDLESS-IMAGES.rst @oneapi-src/unified-runtime-bindless-images-write
30+
scripts/core/exp-bindless-images.yml @oneapi-src/unified-runtime-bindless-images-write
31+
test/conformance/exp_bindless_images** @oneapi-src/unified-runtime-bindless-images-write

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ RUN /opt/install_dpcpp.sh
6767
COPY install_libbacktrace.sh /opt/install_libbacktrace.sh
6868
RUN /opt/install_libbacktrace.sh
6969

70-
# Add a new (non-root) 'user'
71-
ENV USER user
70+
# Add a new (non-root) 'test_user' and switch to it
71+
ENV USER test_user
7272
ENV USERPASS pass
7373
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
74+
USER test_user

.github/scripts/get_system_info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function system_info {
5353
echo "**********/proc/meminfo**********"
5454
cat /proc/meminfo
5555
echo "**********build/bin/urinfo**********"
56-
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo || true
56+
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo --no-linear-ids --verbose || true
5757
echo "******OpenCL*******"
5858
# The driver version of OpenCL Graphics is the compute-runtime version
5959
clinfo || echo "OpenCL not installed"
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: Build - Adapters on HW - Reusable
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
name:
8+
required: true
9+
type: string
10+
platform:
11+
required: false
12+
type: string
13+
default: ""
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
adapter-build-hw:
20+
name: Build & Test HW
21+
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
22+
strategy:
23+
matrix:
24+
adapter: [
25+
{name: "${{inputs.name}}", platform: "${{inputs.platform}}"},
26+
]
27+
build_type: [Debug, Release]
28+
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
29+
# TODO: The latest L0 loader segfaults when built with clang.
30+
exclude:
31+
- adapter: {name: L0, platform: ""}
32+
compiler: {c: clang, cxx: clang++}
33+
34+
runs-on: ${{matrix.adapter.name}}
35+
36+
steps:
37+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
38+
39+
- name: Install pip packages
40+
run: pip install -r third_party/requirements.txt
41+
42+
- name: Download DPC++
43+
run: |
44+
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz
45+
mkdir dpcpp_compiler
46+
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
47+
48+
- name: Configure CMake
49+
run: >
50+
cmake
51+
-B${{github.workspace}}/build
52+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
53+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
54+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
55+
-DUR_ENABLE_TRACING=ON
56+
-DUR_DEVELOPER_MODE=ON
57+
-DUR_BUILD_TESTS=ON
58+
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
59+
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
60+
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
61+
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
62+
${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
63+
64+
- name: Build
65+
# This is so that device binaries can find the sycl runtime library
66+
run: cmake --build ${{github.workspace}}/build -j $(nproc)
67+
68+
- name: Test adapter specific
69+
working-directory: ${{github.workspace}}/build
70+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180
71+
72+
- name: Test adapters
73+
working-directory: ${{github.workspace}}/build
74+
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
75+
76+
- name: Get information about platform
77+
if: ${{ always() }}
78+
run: .github/scripts/get_system_info.sh

.github/workflows/cmake.yml

Lines changed: 36 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/e2e_core.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,19 @@ on:
3434
description: Type of workflow trigger
3535
type: string
3636
required: true
37-
37+
xfail:
38+
description: Allow test failures
39+
type: string
40+
required: false
41+
xfail_not:
42+
description: Not xfail
43+
type: string
44+
required: false
45+
filter_out:
46+
description: Tests to filter out completely
47+
type: string
48+
required: false
49+
3850
permissions:
3951
contents: read
4052
pull-requests: write
@@ -103,7 +115,7 @@ jobs:
103115
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
104116
with:
105117
repository: intel/llvm
106-
ref: sycl
118+
ref: refs/heads/sycl
107119
path: sycl-repo
108120

109121
- name: Set CUDA env vars
@@ -112,11 +124,6 @@ jobs:
112124
echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV
113125
echo "LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
114126
115-
- name: Run pre setup
116-
run: |
117-
source /opt/intel/oneapi/setvars.sh --force
118-
sycl-ls
119-
120127
- name: Configure SYCL
121128
run: >
122129
python3 sycl-repo/buildbot/configure.py
@@ -161,6 +168,13 @@ jobs:
161168
-DCMAKE_CXX_COMPILER="$(which clang++)"
162169
-DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py"
163170
171+
- name: Set test filters for L0
172+
if: matrix.adapter.name == 'L0'
173+
run: |
174+
echo "LIT_XFAIL_NOT=${{inputs.xfail_not}}" >> $GITHUB_ENV
175+
echo "LIT_XFAIL=${{inputs.xfail}}" >> $GITHUB_ENV
176+
echo "LIT_FILTER_OUT=${{inputs.filter_out}}" >> $GITHUB_ENV
177+
164178
- name: Run e2e tests
165179
id: tests
166180
run: ninja -C build-e2e check-sycl-e2e

0 commit comments

Comments
 (0)