Skip to content

Commit 4dac433

Browse files
committed
Merge branch 'main' into config-red-zone-size
2 parents 9f963f8 + 54829f0 commit 4dac433

Some content is hidden

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

66 files changed

+1878
-1105
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: 39 additions & 34 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: 21 additions & 67 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);
@@ -3596,8 +3587,17 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info
35963587
} break;
35973588
case UR_DEVICE_INFO_UUID: {
35983589

3599-
const char *tptr = (const char *)ptr;
3600-
printPtr(os, tptr);
3590+
const uint8_t *tptr = (const uint8_t *)ptr;
3591+
os << "{";
3592+
size_t nelems = size / sizeof(uint8_t);
3593+
for (size_t i = 0; i < nelems; ++i) {
3594+
if (i != 0) {
3595+
os << ", ";
3596+
}
3597+
3598+
os << tptr[i];
3599+
}
3600+
os << "}";
36013601
} break;
36023602
case UR_DEVICE_INFO_PCI_ADDRESS: {
36033603

@@ -9496,6 +9496,16 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
94969496

94979497
os << (params.isUpdatable);
94989498

9499+
os << ", ";
9500+
os << ".isInOrder = ";
9501+
9502+
os << (params.isInOrder);
9503+
9504+
os << ", ";
9505+
os << ".enableProfiling = ";
9506+
9507+
os << (params.enableProfiling);
9508+
94999509
os << "}";
95009510
return os;
95019511
}
@@ -9611,46 +9621,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96119621
return os;
96129622
}
96139623
///////////////////////////////////////////////////////////////////////////////
9614-
/// @brief Print operator for the ur_exp_command_buffer_update_exec_info_desc_t type
9615-
/// @returns
9616-
/// std::ostream &
9617-
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_exec_info_desc_t params) {
9618-
os << "(struct ur_exp_command_buffer_update_exec_info_desc_t){";
9619-
9620-
os << ".stype = ";
9621-
9622-
os << (params.stype);
9623-
9624-
os << ", ";
9625-
os << ".pNext = ";
9626-
9627-
ur::details::printStruct(os,
9628-
(params.pNext));
9629-
9630-
os << ", ";
9631-
os << ".propName = ";
9632-
9633-
os << (params.propName);
9634-
9635-
os << ", ";
9636-
os << ".propSize = ";
9637-
9638-
os << (params.propSize);
9639-
9640-
os << ", ";
9641-
os << ".pProperties = ";
9642-
9643-
os << (params.pProperties);
9644-
9645-
os << ", ";
9646-
os << ".pNewExecInfo = ";
9647-
9648-
os << (params.pNewExecInfo);
9649-
9650-
os << "}";
9651-
return os;
9652-
}
9653-
///////////////////////////////////////////////////////////////////////////////
96549624
/// @brief Print operator for the ur_exp_command_buffer_update_kernel_launch_desc_t type
96559625
/// @returns
96569626
/// std::ostream &
@@ -9682,11 +9652,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96829652

96839653
os << (params.numNewValueArgs);
96849654

9685-
os << ", ";
9686-
os << ".numNewExecInfos = ";
9687-
9688-
os << (params.numNewExecInfos);
9689-
96909655
os << ", ";
96919656
os << ".newWorkDim = ";
96929657

@@ -9725,17 +9690,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
97259690
}
97269691
os << "}";
97279692

9728-
os << ", ";
9729-
os << ".pNewExecInfoList = {";
9730-
for (size_t i = 0; (params.pNewExecInfoList) != NULL && i < params.numNewExecInfos; ++i) {
9731-
if (i != 0) {
9732-
os << ", ";
9733-
}
9734-
9735-
os << ((params.pNewExecInfoList))[i];
9736-
}
9737-
os << "}";
9738-
97399693
os << ", ";
97409694
os << ".pNewGlobalWorkOffset = {";
97419695
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

scripts/core/device.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ etors:
377377
- name: USM_SYSTEM_SHARED_SUPPORT
378378
desc: "[$x_device_usm_access_capability_flags_t] support USM system wide shared memory access"
379379
- name: UUID
380-
desc: "[char[]] return device UUID"
380+
desc: "[uint8_t[]] return device UUID"
381381
- name: PCI_ADDRESS
382382
desc: "[char[]] return device PCI address"
383383
- name: GPU_EU_COUNT

0 commit comments

Comments
 (0)