Skip to content

Commit 5b8a529

Browse files
authored
Merge branch 'main' into yc/new-api-suggestgroupsize
2 parents bbd06fc + b37fa2c commit 5b8a529

35 files changed

+723
-444
lines changed

.github/workflows/e2e_core.yml

Lines changed: 4 additions & 30 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,27 +122,24 @@ 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
162141
run: cmake --build ${{github.workspace}}/sycl_build --target check-sycl
163142

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/
168-
169143
- name: Set additional env. vars
170144
run: |
171145
echo "${{github.workspace}}/sycl_build/bin" >> $GITHUB_PATH

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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)
45
[![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)
56
[![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)
67
[![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)
88
[![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)
99

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

include/ur_api.h

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ typedef enum ur_structure_type_t {
272272
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC = 0x1002, ///< ::ur_exp_command_buffer_update_memobj_arg_desc_t
273273
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC = 0x1003, ///< ::ur_exp_command_buffer_update_pointer_arg_desc_t
274274
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC = 0x1004, ///< ::ur_exp_command_buffer_update_value_arg_desc_t
275-
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC = 0x1005, ///< ::ur_exp_command_buffer_update_exec_info_desc_t
276275
UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t
277276
UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC = 0x2001, ///< ::ur_exp_interop_mem_desc_t
278277
UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC = 0x2002, ///< ::ur_exp_interop_semaphore_desc_t
@@ -8060,19 +8059,6 @@ typedef struct ur_exp_command_buffer_update_value_arg_desc_t {
80608059

80618060
} ur_exp_command_buffer_update_value_arg_desc_t;
80628061

8063-
///////////////////////////////////////////////////////////////////////////////
8064-
/// @brief Descriptor type for updating kernel command execution info.
8065-
typedef struct ur_exp_command_buffer_update_exec_info_desc_t {
8066-
ur_structure_type_t stype; ///< [in] type of this structure, must be
8067-
///< ::UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC
8068-
const void *pNext; ///< [in][optional] pointer to extension-specific structure
8069-
ur_kernel_exec_info_t propName; ///< [in] Name of execution attribute.
8070-
size_t propSize; ///< [in] Size of execution attribute.
8071-
const ur_kernel_exec_info_properties_t *pProperties; ///< [in][optional] Pointer to execution info properties.
8072-
const void *pNewExecInfo; ///< [in] Pointer to memory location holding the execution info value.
8073-
8074-
} ur_exp_command_buffer_update_exec_info_desc_t;
8075-
80768062
///////////////////////////////////////////////////////////////////////////////
80778063
/// @brief Descriptor type for updating a kernel launch command.
80788064
typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
@@ -8082,24 +8068,23 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
80828068
uint32_t numNewMemObjArgs; ///< [in] Length of pNewMemObjArgList.
80838069
uint32_t numNewPointerArgs; ///< [in] Length of pNewPointerArgList.
80848070
uint32_t numNewValueArgs; ///< [in] Length of pNewValueArgList.
8085-
uint32_t numNewExecInfos; ///< [in] Length of pNewExecInfoList.
80868071
uint32_t newWorkDim; ///< [in] Number of work dimensions in the kernel ND-range, from 1-3.
80878072
const ur_exp_command_buffer_update_memobj_arg_desc_t *pNewMemObjArgList; ///< [in][optional][range(0, numNewMemObjArgs)] An array describing the new
80888073
///< kernel mem obj arguments for the command.
80898074
const ur_exp_command_buffer_update_pointer_arg_desc_t *pNewPointerArgList; ///< [in][optional][range(0, numNewPointerArgs)] An array describing the
80908075
///< new kernel pointer arguments for the command.
80918076
const ur_exp_command_buffer_update_value_arg_desc_t *pNewValueArgList; ///< [in][optional][range(0, numNewValueArgs)] An array describing the new
80928077
///< kernel value arguments for the command.
8093-
const ur_exp_command_buffer_update_exec_info_desc_t *pNewExecInfoList; ///< [in][optional][range(0, numNewExecInfos)] An array describing the
8094-
///< execution info objects for the command.
80958078
size_t *pNewGlobalWorkOffset; ///< [in][optional][range(0, newWorkDim)] Array of newWorkDim unsigned
80968079
///< values that describe the offset used to calculate the global ID.
80978080
size_t *pNewGlobalWorkSize; ///< [in][optional][range(0, newWorkDim)] Array of newWorkDim unsigned
80988081
///< values that describe the number of global work-items.
80998082
size_t *pNewLocalWorkSize; ///< [in][optional][range(0, newWorkDim)] Array of newWorkDim unsigned
81008083
///< values that describe the number of work-items that make up a
8101-
///< work-group. If nullptr, the runtime implementation will choose the
8102-
///< work-group size.
8084+
///< work-group. If newWorkDim is non-zero and pNewLocalWorkSize is
8085+
///< nullptr, then runtime implementation will choose the work-group size.
8086+
///< If newWorkDim is zero and pNewLocalWorkSize is nullptr, then the local
8087+
///< work size is unchanged.
81038088

81048089
} ur_exp_command_buffer_update_kernel_launch_desc_t;
81058090

@@ -8134,6 +8119,8 @@ typedef struct ur_exp_command_buffer_command_handle_t_ *ur_exp_command_buffer_co
81348119
/// + `NULL == phCommandBuffer`
81358120
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
81368121
/// - ::UR_RESULT_ERROR_INVALID_DEVICE
8122+
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
8123+
/// + If `pCommandBufferDesc->isUpdatable` is true and `hDevice` does not support UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP.
81378124
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
81388125
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
81398126
UR_APIEXPORT ur_result_t UR_APICALL
@@ -8214,7 +8201,6 @@ urCommandBufferFinalizeExp(
82148201
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
82158202
/// + `NULL == pGlobalWorkOffset`
82168203
/// + `NULL == pGlobalWorkSize`
8217-
/// + `NULL == pLocalWorkSize`
82188204
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
82198205
/// - ::UR_RESULT_ERROR_INVALID_KERNEL
82208206
/// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION
@@ -8233,7 +8219,7 @@ urCommandBufferAppendKernelLaunchExp(
82338219
uint32_t workDim, ///< [in] Dimension of the kernel execution.
82348220
const size_t *pGlobalWorkOffset, ///< [in] Offset to use when executing kernel.
82358221
const size_t *pGlobalWorkSize, ///< [in] Global work size to use when executing kernel.
8236-
const size_t *pLocalWorkSize, ///< [in] Local work size to use when executing kernel.
8222+
const size_t *pLocalWorkSize, ///< [in][optional] Local work size to use when executing kernel.
82378223
uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list.
82388224
const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on.
82398225
ur_exp_command_buffer_sync_point_t *pSyncPoint, ///< [out][optional] Sync point associated with this command.
@@ -8735,6 +8721,10 @@ urCommandBufferReleaseCommandExp(
87358721
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
87368722
/// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true on creation of the command buffer `hCommand` belongs to.
87378723
/// + If the command-buffer `hCommand` belongs to has not been finalized.
8724+
/// + If `pUpdateKernellaunch->newWorkDim` is non-zero and different from the work-dim used on creation of `hCommand`.
8725+
/// + If `pUpdateKernellaunch->newWorkDim` is non-zero and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value and `pUpdateKernelLaunch->pNewGlobalWorkSize` is NULL.
8726+
/// + If `pUpdateKernellaunch->newWorkDim` is non-zero and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value when `hCommand` was created with a NULL local work size.
8727+
/// + If `pUpdateKernellaunch->newWorkDim` is non-zero and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a NULL value when `hCommand` was created with a non-NULL local work size.
87388728
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP
87398729
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
87408730
/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX

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: 0 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

@@ -1052,9 +1051,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value
10521051
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC:
10531052
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC";
10541053
break;
1055-
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC:
1056-
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC";
1057-
break;
10581054
case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES:
10591055
os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES";
10601056
break;
@@ -1293,11 +1289,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
12931289
printPtr(os, pstruct);
12941290
} break;
12951291

1296-
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC: {
1297-
const ur_exp_command_buffer_update_exec_info_desc_t *pstruct = (const ur_exp_command_buffer_update_exec_info_desc_t *)ptr;
1298-
printPtr(os, pstruct);
1299-
} break;
1300-
13011292
case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: {
13021293
const ur_exp_sampler_mip_properties_t *pstruct = (const ur_exp_sampler_mip_properties_t *)ptr;
13031294
printPtr(os, pstruct);
@@ -9623,46 +9614,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96239614
return os;
96249615
}
96259616
///////////////////////////////////////////////////////////////////////////////
9626-
/// @brief Print operator for the ur_exp_command_buffer_update_exec_info_desc_t type
9627-
/// @returns
9628-
/// std::ostream &
9629-
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_exec_info_desc_t params) {
9630-
os << "(struct ur_exp_command_buffer_update_exec_info_desc_t){";
9631-
9632-
os << ".stype = ";
9633-
9634-
os << (params.stype);
9635-
9636-
os << ", ";
9637-
os << ".pNext = ";
9638-
9639-
ur::details::printStruct(os,
9640-
(params.pNext));
9641-
9642-
os << ", ";
9643-
os << ".propName = ";
9644-
9645-
os << (params.propName);
9646-
9647-
os << ", ";
9648-
os << ".propSize = ";
9649-
9650-
os << (params.propSize);
9651-
9652-
os << ", ";
9653-
os << ".pProperties = ";
9654-
9655-
os << (params.pProperties);
9656-
9657-
os << ", ";
9658-
os << ".pNewExecInfo = ";
9659-
9660-
os << (params.pNewExecInfo);
9661-
9662-
os << "}";
9663-
return os;
9664-
}
9665-
///////////////////////////////////////////////////////////////////////////////
96669617
/// @brief Print operator for the ur_exp_command_buffer_update_kernel_launch_desc_t type
96679618
/// @returns
96689619
/// std::ostream &
@@ -9694,11 +9645,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
96949645

96959646
os << (params.numNewValueArgs);
96969647

9697-
os << ", ";
9698-
os << ".numNewExecInfos = ";
9699-
9700-
os << (params.numNewExecInfos);
9701-
97029648
os << ", ";
97039649
os << ".newWorkDim = ";
97049650

@@ -9737,17 +9683,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu
97379683
}
97389684
os << "}";
97399685

9740-
os << ", ";
9741-
os << ".pNewExecInfoList = {";
9742-
for (size_t i = 0; (params.pNewExecInfoList) != NULL && i < params.numNewExecInfos; ++i) {
9743-
if (i != 0) {
9744-
os << ", ";
9745-
}
9746-
9747-
os << ((params.pNewExecInfoList))[i];
9748-
}
9749-
os << "}";
9750-
97519686
os << ", ";
97529687
os << ".pNewGlobalWorkOffset = {";
97539688
for (size_t i = 0; (params.pNewGlobalWorkOffset) != NULL && i < params.newWorkDim; ++i) {

scripts/core/EXP-COMMAND-BUFFER.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ Enums
256256
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC
257257
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC
258258
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC
259-
* ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC
260259
* ${x}_command_t
261260
* ${X}_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP
262261
* ${x}_function_t
@@ -290,7 +289,6 @@ Types
290289
* ${x}_exp_command_buffer_update_memobj_arg_desc_t
291290
* ${x}_exp_command_buffer_update_pointer_arg_desc_t
292291
* ${x}_exp_command_buffer_update_value_arg_desc_t
293-
* ${x}_exp_command_buffer_update_exec_info_desc_t
294292
* ${x}_exp_command_buffer_sync_point_t
295293
* ${x}_exp_command_buffer_handle_t
296294
* ${x}_exp_command_buffer_command_handle_t

0 commit comments

Comments
 (0)