Skip to content

Commit bef3850

Browse files
committed
Merge branch 'main' into review/yang/local_accessor
2 parents f2c4a82 + 24f7d66 commit bef3850

File tree

87 files changed

+2298
-954
lines changed

Some content is hidden

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

87 files changed

+2298
-954
lines changed

.github/workflows/e2e_core.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,6 @@ jobs:
106106
ref: sycl
107107
path: sycl-repo
108108

109-
- name: Install pip packages
110-
working-directory: ${{github.workspace}}/ur-repo
111-
run: pip install -r third_party/requirements.txt
112-
113-
- name: Configure CMake UR
114-
working-directory: ${{github.workspace}}/ur-repo
115-
run: >
116-
cmake
117-
-B build
118-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
119-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
120-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
121-
-DUR_ENABLE_TRACING=ON
122-
-DUR_DEVELOPER_MODE=ON
123-
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
124-
125-
- name: Build UR
126-
run: LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
127-
cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc)
128-
129-
- name: Set prefer UR
130-
run: echo "SYCL_PREFER_UR=1" >> $GITHUB_ENV
131-
132109
- name: Set CUDA env vars
133110
if: matrix.adapter.name == 'CUDA'
134111
run: |
@@ -145,26 +122,23 @@ jobs:
145122
python3 sycl-repo/buildbot/configure.py
146123
-t ${{matrix.build_type}}
147124
-o ${{github.workspace}}/sycl_build
148-
--cmake-gen "Unix Makefiles"
125+
--cmake-gen "Ninja"
149126
--ci-defaults ${{matrix.adapter.config}}
150127
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
151128
--cmake-opt="-DSYCL_PI_TESTS=OFF"
129+
--cmake-opt="-DSYCL_PI_UR_USE_FETCH_CONTENT=OFF"
130+
--cmake-opt="-DSYCL_PI_UR_SOURCE_DIR=${{github.workspace}}/ur-repo/"
152131
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
153132
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
154133
155134
- name: Build SYCL
156-
run: cmake --build ${{github.workspace}}/sycl_build
135+
run: cmake --build ${{github.workspace}}/sycl_build -j
157136

158137
- name: Run check-sycl
159138
# Remove after fixing SYCL test :: abi/layout_handler.cpp
160139
# This issue does not affect further execution of e2e with UR.
161140
continue-on-error: true
162-
run: cmake --build ${{github.workspace}}/sycl_build --target check-sycl
163-
164-
- name: Swap UR loader and adapters
165-
run: |
166-
cp ${{github.workspace}}/ur-repo/build/lib/libur_loader.so* ${{github.workspace}}/sycl_build/lib/
167-
cp ${{github.workspace}}/ur-repo/build/lib/libur_adapter_${{matrix.adapter.str_name}}.so* ${{github.workspace}}/sycl_build/lib/
141+
run: cmake --build ${{github.workspace}}/sycl_build --target check-sycl -j6
168142

169143
- name: Set additional env. vars
170144
run: |

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Unified Runtime
22

33
[![Build and test](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml)
4+
[![E2E Cuda](https://github.com/oneapi-src/unified-runtime/actions/workflows/e2e_cuda.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/e2e_cuda.yml)
5+
[![E2E OpenCL](https://github.com/oneapi-src/unified-runtime/actions/workflows/e2e_opencl.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/e2e_opencl.yml)
46
[![CodeQL](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml)
57
[![Bandit](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml)
68
[![Coverity](https://scan.coverity.com/projects/28213/badge.svg)](https://scan.coverity.com/projects/oneapi-src-unified-runtime)
7-
[![codecov.io](https://codecov.io/github/oneapi-src/unified-runtime/coverage.svg?branch=main)](https://codecov.io/github/oneapi-src/unified-runtime?branch=master)
89
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/unified-runtime/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/unified-runtime)
910

1011
<!-- TODO: add general description and purpose of the project -->

include/ur_api.h

Lines changed: 47 additions & 36 deletions
Large diffs are not rendered by default.

include/ur_print.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -994,14 +994,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdatePointerArgDesc(
994994
/// - `buff_size < out_size`
995995
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateValueArgDesc(const struct ur_exp_command_buffer_update_value_arg_desc_t params, char *buffer, const size_t buff_size, size_t *out_size);
996996

997-
///////////////////////////////////////////////////////////////////////////////
998-
/// @brief Print ur_exp_command_buffer_update_exec_info_desc_t struct
999-
/// @returns
1000-
/// - ::UR_RESULT_SUCCESS
1001-
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1002-
/// - `buff_size < out_size`
1003-
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateExecInfoDesc(const struct ur_exp_command_buffer_update_exec_info_desc_t params, char *buffer, const size_t buff_size, size_t *out_size);
1004-
1005997
///////////////////////////////////////////////////////////////////////////////
1006998
/// @brief Print ur_exp_command_buffer_update_kernel_launch_desc_t struct
1007999
/// @returns

include/ur_print.hpp

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
334334
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_memobj_arg_desc_t params);
335335
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_pointer_arg_desc_t params);
336336
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_value_arg_desc_t params);
337-
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_exec_info_desc_t params);
338337
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_kernel_launch_desc_t params);
339338
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_peer_info_t value);
340339

@@ -1049,9 +1048,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value
10491048
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC:
10501049
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC";
10511050
break;
1052-
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC:
1053-
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC";
1054-
break;
10551051
case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES:
10561052
os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES";
10571053
break;
@@ -1290,11 +1286,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
12901286
printPtr(os, pstruct);
12911287
} break;
12921288

1293-
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC: {
1294-
const ur_exp_command_buffer_update_exec_info_desc_t *pstruct = (const ur_exp_command_buffer_update_exec_info_desc_t *)ptr;
1295-
printPtr(os, pstruct);
1296-
} break;
1297-
12981289
case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: {
12991290
const ur_exp_sampler_mip_properties_t *pstruct = (const ur_exp_sampler_mip_properties_t *)ptr;
13001291
printPtr(os, pstruct);
@@ -9505,6 +9496,16 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
95059496

95069497
os << (params.isUpdatable);
95079498

9499+
os << ", ";
9500+
os << ".isInOrder = ";
9501+
9502+
os << (params.isInOrder);
9503+
9504+
os << ", ";
9505+
os << ".enableProfiling = ";
9506+
9507+
os << (params.enableProfiling);
9508+
95089509
os << "}";
95099510
return os;
95109511
}
@@ -9620,46 +9621,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96209621
return os;
96219622
}
96229623
///////////////////////////////////////////////////////////////////////////////
9623-
/// @brief Print operator for the ur_exp_command_buffer_update_exec_info_desc_t type
9624-
/// @returns
9625-
/// std::ostream &
9626-
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_exec_info_desc_t params) {
9627-
os << "(struct ur_exp_command_buffer_update_exec_info_desc_t){";
9628-
9629-
os << ".stype = ";
9630-
9631-
os << (params.stype);
9632-
9633-
os << ", ";
9634-
os << ".pNext = ";
9635-
9636-
ur::details::printStruct(os,
9637-
(params.pNext));
9638-
9639-
os << ", ";
9640-
os << ".propName = ";
9641-
9642-
os << (params.propName);
9643-
9644-
os << ", ";
9645-
os << ".propSize = ";
9646-
9647-
os << (params.propSize);
9648-
9649-
os << ", ";
9650-
os << ".pProperties = ";
9651-
9652-
os << (params.pProperties);
9653-
9654-
os << ", ";
9655-
os << ".pNewExecInfo = ";
9656-
9657-
os << (params.pNewExecInfo);
9658-
9659-
os << "}";
9660-
return os;
9661-
}
9662-
///////////////////////////////////////////////////////////////////////////////
96639624
/// @brief Print operator for the ur_exp_command_buffer_update_kernel_launch_desc_t type
96649625
/// @returns
96659626
/// std::ostream &
@@ -9691,11 +9652,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96919652

96929653
os << (params.numNewValueArgs);
96939654

9694-
os << ", ";
9695-
os << ".numNewExecInfos = ";
9696-
9697-
os << (params.numNewExecInfos);
9698-
96999655
os << ", ";
97009656
os << ".newWorkDim = ";
97019657

@@ -9734,17 +9690,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
97349690
}
97359691
os << "}";
97369692

9737-
os << ", ";
9738-
os << ".pNewExecInfoList = {";
9739-
for (size_t i = 0; (params.pNewExecInfoList) != NULL && i < params.numNewExecInfos; ++i) {
9740-
if (i != 0) {
9741-
os << ", ";
9742-
}
9743-
9744-
os << ((params.pNewExecInfoList))[i];
9745-
}
9746-
os << "}";
9747-
97489693
os << ", ";
97499694
os << ".pNewGlobalWorkOffset = {";
97509695
for (size_t i = 0; (params.pNewGlobalWorkOffset) != NULL && i < params.newWorkDim; ++i) {

scripts/core/EXP-COMMAND-BUFFER.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ Command-Buffer Creation
7777
Command-Buffers are tied to a specific ${x}_context_handle_t and
7878
${x}_device_handle_t. ${x}CommandBufferCreateExp optionally takes a descriptor
7979
to provide additional properties for how the command-buffer should be
80-
constructed. The only unique member defined in ${x}_exp_command_buffer_desc_t
81-
is ``isUpdatable``, which should be set to ``true`` to support :ref:`updating
80+
constructed. The members defined in ${x}_exp_command_buffer_desc_t are:
81+
* ``isUpdatable``, which should be set to ``true`` to support :ref:`updating
8282
command-buffer commands`.
83+
* ``isInOrder``, which should be set to ``true`` to enable commands enqueued to
84+
a command-buffer to be executed in an in-order fashion where possible.
85+
* ``enableProfiling``, which should be set to ``true`` to enable profiling of
86+
the command-buffer.
8387

8488
Command-buffers are reference counted and can be retained and released by
8589
calling ${x}CommandBufferRetainExp and ${x}CommandBufferReleaseExp respectively.
@@ -123,7 +127,8 @@ Sync-Points
123127
A sync-point is a value which represents a command inside of a command-buffer
124128
which is returned from command-buffer append function calls. These can be
125129
optionally passed to these functions to define execution dependencies on other
126-
commands within the command-buffer.
130+
commands within the command-buffer. Sync-points passed to functions may be
131+
ignored if the command-buffer was created in-order.
127132

128133
Sync-points are unique and valid for use only within the command-buffer they
129134
were obtained from.
@@ -256,7 +261,6 @@ Enums
256261
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC
257262
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC
258263
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC
259-
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC
260264
* ${x}_command_t
261265
* ${X}_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP
262266
* ${x}_function_t
@@ -290,7 +294,6 @@ Types
290294
* ${x}_exp_command_buffer_update_memobj_arg_desc_t
291295
* ${x}_exp_command_buffer_update_pointer_arg_desc_t
292296
* ${x}_exp_command_buffer_update_value_arg_desc_t
293-
* ${x}_exp_command_buffer_update_exec_info_desc_t
294297
* ${x}_exp_command_buffer_sync_point_t
295298
* ${x}_exp_command_buffer_handle_t
296299
* ${x}_exp_command_buffer_command_handle_t

0 commit comments

Comments
 (0)