Skip to content

Commit 0ac5678

Browse files
authored
Merge branch 'main' into hip-set-device
2 parents d65ade4 + 3cd6eae commit 0ac5678

File tree

146 files changed

+5564
-3954
lines changed

Some content is hidden

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

146 files changed

+5564
-3954
lines changed

.github/workflows/benchmarks_compute.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,17 @@ jobs:
151151
- name: Build SYCL
152152
run: cmake --build ${{github.workspace}}/sycl_build -j
153153

154-
- name: Set oneAPI Device Selector
155-
run: |
156-
echo "ONEAPI_DEVICE_SELECTOR=${{ matrix.adapter.str_name }}:${{ matrix.adapter.unit }}" >> $GITHUB_ENV
154+
- name: Configure UR
155+
working-directory: ${{github.workspace}}/ur-repo
156+
run: >
157+
cmake -DCMAKE_BUILD_TYPE=Release
158+
-B${{github.workspace}}/ur-repo/build
159+
-DUR_BUILD_TESTS=OFF
160+
-DUR_BUILD_ADAPTER_L0=ON
161+
-DUR_BUILD_ADAPTER_L0_V2=ON
162+
163+
- name: Build UR
164+
run: cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc)
157165

158166
- name: Run benchmarks
159167
id: benchmarks

.github/workflows/build-hw-reusable.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
required: false
1919
type: string
2020
default: OFF
21+
static_adapter:
22+
required: false
23+
type: string
24+
default: OFF
2125

2226
permissions:
2327
contents: read
@@ -36,7 +40,7 @@ jobs:
3640
strategy:
3741
matrix:
3842
adapter: [
39-
{name: "${{inputs.adapter_name}}", platform: "${{inputs.platform}}", static_Loader: "${{inputs.static_loader}}"},
43+
{name: "${{inputs.adapter_name}}", platform: "${{inputs.platform}}", static_Loader: "${{inputs.static_loader}}", static_adapter: "${{inputs.static_loader}}"},
4044
]
4145
build_type: [Debug, Release]
4246
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
@@ -49,6 +53,10 @@ jobs:
4953
build_type: Release
5054
- adapter: {static_Loader: ON}
5155
compiler: {c: clang, cxx: clang++}
56+
- adapter: {static_adapter: ON}
57+
build_type: Release
58+
- adapter: {static_adapter: ON}
59+
compiler: {c: clang, cxx: clang++}
5260

5361
runs-on: ${{inputs.runner_name}}
5462

@@ -76,6 +84,7 @@ jobs:
7684
-DUR_BUILD_TESTS=ON
7785
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
7886
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
87+
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
7988
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
8089
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
8190
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}

.github/workflows/cmake.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
compiler: [{c: gcc, cxx: g++}]
2121
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=OFF']
2222
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF']
23-
latency_tracking: ['-DUMF_ENABLE_LATENCY_TRACKING=OFF']
23+
latency_tracking: ['-DUR_ENABLE_LATENCY_HISTOGRAM=OFF']
2424
include:
2525
- os: 'ubuntu-22.04'
2626
build_type: Release
@@ -40,7 +40,7 @@ jobs:
4040
- os: 'ubuntu-22.04'
4141
build_type: Release
4242
compiler: {c: clang, cxx: clang++}
43-
latency_tracking: '-DUMF_ENABLE_LATENCY_TRACKING=ON'
43+
latency_tracking: '-DUR_ENABLE_LATENCY_HISTOGRAM=ON'
4444
runs-on: ${{ (matrix.os == 'ubuntu-22.04' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }}
4545

4646
steps:
@@ -155,6 +155,7 @@ jobs:
155155
adapter_name: L0
156156
runner_name: L0
157157
static_loader: ON
158+
static_adapter: ON
158159

159160
opencl:
160161
name: OpenCL
@@ -216,7 +217,8 @@ jobs:
216217
os: ['windows-2019', 'windows-2022']
217218
adapter: [
218219
{name: None, var: ''}, {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'},
219-
{name: None, var: ''}, {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'}
220+
{name: None, var: ''}, {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'},
221+
{name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'}
220222
]
221223

222224
# TODO: building level zero loader on windows-2019 and clang-cl is currently broken
@@ -225,16 +227,25 @@ jobs:
225227
adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}
226228
- os: 'windows-2019'
227229
adapter: {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'}
230+
- os: 'windows-2019'
231+
adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'}
228232
- adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}
229233
compiler: {c: clang-cl, cxx: clang-cl}
230234
- adapter: {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'}
231235
compiler: {c: clang-cl, cxx: clang-cl}
236+
- adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'}
237+
compiler: {c: clang-cl, cxx: clang-cl}
232238

233239
build_type: [Debug, Release]
234240
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
235241
include:
236242
- compiler: {c: clang-cl, cxx: clang-cl}
237243
toolset: "-T ClangCL"
244+
- os: 'windows-2022'
245+
adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'}
246+
build_type: 'Release'
247+
compiler: {c: cl, cxx: cl}
248+
238249
runs-on: ${{matrix.os}}
239250

240251
steps:

.github/workflows/e2e_core.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ jobs:
169169
-DCMAKE_CXX_COMPILER="$(which clang++)"
170170
-DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py"
171171
172-
- name: Set LIT_XFAIL_NOT
173-
if: inputs.xfail_not != ''
174-
run: echo "LIT_XFAIL_NOT=${{inputs.xfail_not}}" >> $GITHUB_ENV
175-
176172
- name: Set LIT_XFAIL
177173
if: inputs.xfail != ''
178174
run: echo "LIT_XFAIL=${{inputs.xfail}}" >> $GITHUB_ENV
@@ -181,6 +177,10 @@ jobs:
181177
if: inputs.filter_out != ''
182178
run: echo "LIT_FILTER_OUT=${{inputs.filter_out}}" >> $GITHUB_ENV
183179

180+
- name: Set LIT_XFAIL_NOT
181+
if: inputs.xfail_not != ''
182+
run: echo "LIT_XFAIL_NOT=${{inputs.xfail_not}}" >> $GITHUB_ENV
183+
184184
# TODO: remove once intel/llvm lit tests can properly recognize the GPU
185185
- name: Configure hardware platform feature for L0
186186
if: matrix.adapter.name == 'L0'

.github/workflows/e2e_cuda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ jobs:
2121
config: "--cuda"
2222
unit: "gpu"
2323
extra_lit_flags: "-sv --max-time=3600"
24+
xfail: "Regression/device_num.cpp"

.github/workflows/e2e_level_zero.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ jobs:
2121
config: ""
2222
unit: "gpu"
2323
# Failing tests
24-
xfail: "DeviceCodeSplit/grf.cpp;ESIMD/grf.cpp;ESIMD/mask_expand_load.cpp;KernelAndProgram/target_register_alloc_mode.cpp;Matrix/SG32/get_coord_int8_matB.cpp;Matrix/get_coord_int8_matB.cpp;Matrix/joint_matrix_prefetch.cpp;Matrix/joint_matrix_rowmajorA_rowmajorB.cpp; SYCL :: ESIMD/mask_expand_load.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_bf16_fill_k_cache_OOB.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_out_bounds.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_prefetch.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_rowmajorA_rowmajorB.cpp;Matrix/element_wise_all_ops_1d.cpp;Matrix/element_wise_all_ops_1d_cont.cpp;Matrix/element_wise_all_ops_scalar.cpp;Matrix/joint_matrix_bf16_fill_k_cache_OOB.cpp;Matrix/joint_matrix_bf16_fill_k_cache_prefetch.cpp;Matrix/joint_matrix_out_bounds.cpp;Matrix/joint_matrix_unaligned_k.cpp"
24+
xfail: "DeviceCodeSplit/grf.cpp;ESIMD/mask_expand_load.cpp;KernelAndProgram/target_register_alloc_mode.cpp;Matrix/SG32/get_coord_int8_matB.cpp;Matrix/get_coord_int8_matB.cpp;Matrix/joint_matrix_prefetch.cpp;Matrix/joint_matrix_rowmajorA_rowmajorB.cpp;ESIMD/mask_expand_load.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_bf16_fill_k_cache_OOB.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_out_bounds.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_prefetch.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_rowmajorA_rowmajorB.cpp;Matrix/element_wise_all_ops_1d.cpp;Matrix/element_wise_all_ops_1d_cont.cpp;Matrix/element_wise_all_ops_scalar.cpp;Matrix/joint_matrix_bf16_fill_k_cache_OOB.cpp;Matrix/joint_matrix_bf16_fill_k_cache_prefetch.cpp;Matrix/joint_matrix_out_bounds.cpp;Matrix/joint_matrix_unaligned_k.cpp;Matrix/SPVCooperativeMatrix/SG32/get_coord_int8_matB.cpp;Matrix/SPVCooperativeMatrix/element_wise_all_ops_1d.cpp;Matrix/SPVCooperativeMatrix/element_wise_all_ops_1d_cont.cpp;Matrix/SPVCooperativeMatrix/element_wise_all_ops_scalar.cpp;Matrix/SPVCooperativeMatrix/element_wise_ops.cpp;Matrix/SPVCooperativeMatrix/get_coord_int8_matB.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_bf16_fill_k_cache_SLM.cpp;Matrix/joint_matrix_bf16_fill_k_cache_SLM.cpp"
25+
# Unexpectedly Passed Tests
26+
xfail_not: ""
2527
# Flaky tests
26-
filter_out: "ESIMD/named_barriers/loop_extended.cpp;ESIMD/local_accessor_copy_to_from.cpp;"
28+
filter_out: "Basic/accessor/accessor.cpp|DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp|Graph/Explicit/interop-level-zero-launch-kernel.cpp|Graph/RecordReplay/interop-level-zero-launch-kernel.cpp|syclcompat/launch/launch_policy_lmem.cpp"
2729
# These runners by default spawn upwards of 260 workers.
2830
# We also add a time out just in case some test hangs
2931
extra_lit_flags: "--param gpu-intel-pvc=True --param gpu-intel-pvc-1T=True -sv -j 100 --max-time=3600"

.github/workflows/e2e_opencl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
prefix: ""
2121
config: ""
2222
unit: "cpu"
23-
xfail: "AOT/double.cpp;AOT/half.cpp;AOT/reqd-sg-size.cpp;Basic/built-ins/marray_geometric.cpp;KernelCompiler/kernel_compiler_spirv.cpp;KernelCompiler/opencl_queries.cpp"
23+
xfail: "AOT/double.cpp;AOT/half.cpp;AOT/reqd-sg-size.cpp;Basic/built-ins/marray_geometric.cpp;KernelCompiler/kernel_compiler_spirv.cpp;KernelCompiler/opencl_queries.cpp;NonUniformGroups/ballot_group.cpp;NonUniformGroups/ballot_group_algorithms.cpp;NonUniformGroups/fixed_size_group_algorithms.cpp;NonUniformGroups/opportunistic_group.cpp;NonUniformGroups/opportunistic_group_algorithms.cpp;NonUniformGroups/tangle_group.cpp;NonUniformGroups/tangle_group_algorithms.cpp"
2424
extra_lit_flags: "-sv --max-time=3600"

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ option(UR_BUILD_ADAPTER_HIP "Build the HIP adapter" OFF)
5252
option(UR_BUILD_ADAPTER_NATIVE_CPU "Build the Native-CPU adapter" OFF)
5353
option(UR_BUILD_ADAPTER_ALL "Build all currently supported adapters" OFF)
5454
option(UR_BUILD_ADAPTER_L0_V2 "Build the (experimental) Level-Zero v2 adapter" OFF)
55+
option(UR_STATIC_ADAPTER_L0 "Build the Level-Zero adapter as static and embed in the loader" OFF)
5556
option(UR_BUILD_EXAMPLE_CODEGEN "Build the codegen example." OFF)
5657
option(VAL_USE_LIBBACKTRACE_BACKTRACE "enable libbacktrace validation backtrace for linux" OFF)
5758
option(UR_ENABLE_ASSERTIONS "Enable assertions for all build types" OFF)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ List of options provided by CMake:
145145
| UR_DEVICE_CODE_EXTRACTOR | Path of the `clang-offload-extract` executable from the DPC++ package, required for CTS device binaries | File path | `"${dirname(UR_DPCXX)}/clang-offload-extract"` |
146146
| UR_DPCXX_BUILD_FLAGS | Build flags to pass to DPC++ when compiling device programs | Space-separated options list | `""` |
147147
| UR_SYCL_LIBRARY_DIR | Path of the SYCL runtime library directory to build CTS device binaries | Directory path | `""` |
148-
| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | `/opt/rocm` |
148+
| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | `$ENV{ROCM_PATH}` or `/opt/rocm` |
149149
| UR_HIP_INCLUDE_DIR | Path of the ROCm HIP include directory | Directory path | `${UR_HIP_ROCM_DIR}/include` |
150150
| UR_HIP_HSA_INCLUDE_DIRS | Path of the ROCm HSA include directory | Directory path | `${UR_HIP_ROCM_DIR}/hsa/include;${UR_HIP_ROCM_DIR}/include` |
151151
| UR_HIP_LIB_DIR | Path of the ROCm HIP library directory | Directory path | `${UR_HIP_ROCM_DIR}/lib` |

cmake/helpers.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ function(add_ur_target_compile_options name)
7070
)
7171
if (CMAKE_BUILD_TYPE STREQUAL "Release")
7272
target_compile_definitions(${name} PRIVATE -D_FORTIFY_SOURCE=2)
73+
target_compile_options(${name} PRIVATE -fvisibility=hidden)
7374
endif()
7475
if(UR_DEVELOPER_MODE)
7576
target_compile_options(${name} PRIVATE

0 commit comments

Comments
 (0)