@@ -10446,6 +10446,21 @@ typedef struct ur_exp_command_buffer_desc_t {
1044610446
1044710447} ur_exp_command_buffer_desc_t;
1044810448
10449+ ///////////////////////////////////////////////////////////////////////////////
10450+ /// @brief A value that identifies a command inside of a command-buffer, used
10451+ /// for
10452+ /// defining dependencies between commands in the same command-buffer.
10453+ typedef uint32_t ur_exp_command_buffer_sync_point_t;
10454+
10455+ ///////////////////////////////////////////////////////////////////////////////
10456+ /// @brief Handle of Command-Buffer object
10457+ typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
10458+
10459+ ///////////////////////////////////////////////////////////////////////////////
10460+ /// @brief Handle of a Command-Buffer command
10461+ typedef struct ur_exp_command_buffer_command_handle_t_
10462+ *ur_exp_command_buffer_command_handle_t;
10463+
1044910464///////////////////////////////////////////////////////////////////////////////
1045010465/// @brief Descriptor type for updating a kernel command memobj argument.
1045110466typedef struct ur_exp_command_buffer_update_memobj_arg_desc_t {
@@ -10509,6 +10524,8 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1050910524 ur_structure_type_t stype;
1051010525 /// [in][optional] pointer to extension-specific structure
1051110526 const void *pNext;
10527+ /// [in] Handle of the command-buffer kernel command to update.
10528+ ur_exp_command_buffer_command_handle_t hCommand;
1051210529 /// [in][optional] The new kernel handle. If this parameter is nullptr,
1051310530 /// the current kernel handle in `hCommand`
1051410531 /// will be used. If a kernel handle is passed, it must be a valid kernel
@@ -10558,21 +10575,6 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1055810575
1055910576} ur_exp_command_buffer_update_kernel_launch_desc_t;
1056010577
10561- ///////////////////////////////////////////////////////////////////////////////
10562- /// @brief A value that identifies a command inside of a command-buffer, used
10563- /// for
10564- /// defining dependencies between commands in the same command-buffer.
10565- typedef uint32_t ur_exp_command_buffer_sync_point_t;
10566-
10567- ///////////////////////////////////////////////////////////////////////////////
10568- /// @brief Handle of Command-Buffer object
10569- typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
10570-
10571- ///////////////////////////////////////////////////////////////////////////////
10572- /// @brief Handle of a Command-Buffer command
10573- typedef struct ur_exp_command_buffer_command_handle_t_
10574- *ur_exp_command_buffer_command_handle_t;
10575-
1057610578///////////////////////////////////////////////////////////////////////////////
1057710579/// @brief Create a Command-Buffer object
1057810580///
@@ -11520,74 +11522,84 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
1152011522///
1152111523/// @details
1152211524/// This entry-point is synchronous and may block if the command-buffer is
11523- /// executing when the entry-point is called.
11525+ /// executing when the entry-point is called. On error, the state of the
11526+ /// command-buffer commands being updated is undefined.
1152411527///
1152511528/// @returns
1152611529/// - ::UR_RESULT_SUCCESS
1152711530/// - ::UR_RESULT_ERROR_UNINITIALIZED
1152811531/// - ::UR_RESULT_ERROR_DEVICE_LOST
1152911532/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1153011533/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
11531- /// + `NULL == hCommand`
11534+ /// + `NULL == hCommandBuffer`
11535+ /// + `NULL == pUpdateKernelLaunch->hCommand`
1153211536/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1153311537/// + `NULL == pUpdateKernelLaunch`
11538+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
11539+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
11540+ /// + `numKernelUpdates == 0`
1153411541/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
1153511542/// + If
1153611543/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS
11537- /// is not supported by the device, but any of
11538- /// `pUpdateKernelLaunch->numNewMemObjArgs`,
11539- /// `pUpdateKernelLaunch->numNewPointerArgs`, or
11540- /// `pUpdateKernelLaunch->numNewValueArgs` are not zero.
11544+ /// is not supported by the device, and for any of any element of
11545+ /// `pUpdateKernelLaunch` the `numNewMemObjArgs`, `numNewPointerArgs`,
11546+ /// or `numNewValueArgs` members are not zero.
1154111547/// + If
1154211548/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11543- /// not supported by the device but
11544- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is not nullptr.
11549+ /// not supported by the device, and for any element of
11550+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is not nullptr.
1154511551/// + If
1154611552/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11547- /// not supported by the device but
11548- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is nullptr and
11549- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr.
11553+ /// not supported by the device, and for any element of
11554+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is nullptr and
11555+ /// `pNewGlobalWorkSize` is not nullptr.
1155011556/// + If
1155111557/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE
11552- /// is not supported by the device but
11553- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr
11558+ /// is not supported by the device, and for any element of
11559+ /// `pUpdateKernelLaunch` the ` pNewGlobalWorkSize` member is not nullptr
1155411560/// + If
1155511561/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET
11556- /// is not supported by the device but
11557- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` is not nullptr.
11562+ /// is not supported by the device, and for any element of
11563+ /// `pUpdateKernelLaunch` the `pNewGlobalWorkOffset` member is not
11564+ /// nullptr.
1155811565/// + If ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE
11559- /// is not supported by the device but `pUpdateKernelLaunch->hNewKernel`
11560- /// is not nullptr.
11566+ /// is not supported by the device, and for any element of
11567+ /// `pUpdateKernelLaunch` the `hNewKernel` member is not nullptr.
1156111568/// - ::UR_RESULT_ERROR_INVALID_OPERATION
1156211569/// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true
11563- /// on creation of the command-buffer `hCommand` belongs to.
11564- /// + If the command-buffer `hCommand` belongs to has not been
11565- /// finalized.
11570+ /// on creation of the `hCommandBuffer`.
11571+ /// + If `hCommandBuffer` has not been finalized.
1156611572/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP
11567- /// + If `hCommand` is not a kernel execution command.
11573+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11574+ /// is not a kernel execution command.
11575+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11576+ /// was not created from `hCommandBuffer`.
1156811577/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
1156911578/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
1157011579/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE
1157111580/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1157211581/// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION
11573- /// + `pUpdateKernelLaunch->newWorkDim < 1 ||
11574- /// pUpdateKernelLaunch->newWorkDim > 3`
11582+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11583+ /// member is less than 1 or greater than 3.
1157511584/// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
1157611585/// - ::UR_RESULT_ERROR_INVALID_VALUE
11577- /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the
11578- /// `hKernel` or `phKernelAlternatives` parameters of
11579- /// ::urCommandBufferAppendKernelLaunchExp when this command was
11580- /// created.
11581- /// + If `pUpdateKernelLaunch->newWorkDim` is different from the current
11582- /// workDim in `hCommand` and,
11583- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize`, or
11584- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` are nullptr.
11586+ /// + If for any element of `pUpdateKernelLaunch` the `hNewKernel`
11587+ /// member was not passed to the `hKernel` or `phKernelAlternatives`
11588+ /// parameters of ::urCommandBufferAppendKernelLaunchExp when the
11589+ /// command was created.
11590+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11591+ /// member is different from the current workDim in the `hCommand`
11592+ /// member, and ` pNewGlobalWorkSize` or `pNewGlobalWorkOffset` are
11593+ /// nullptr.
1158511594/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
1158611595/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
1158711596UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
11588- /// [in] Handle of the command-buffer kernel command to update.
11589- ur_exp_command_buffer_command_handle_t hCommand,
11590- /// [in] Struct defining how the kernel command is to be updated.
11597+ /// [in] Handle of the command-buffer object.
11598+ ur_exp_command_buffer_handle_t hCommandBuffer,
11599+ /// [in] Length of pUpdateKernelLaunch.
11600+ uint32_t numKernelUpdates,
11601+ /// [in][range(0, numKernelUpdates)] List of structs defining how a
11602+ /// kernel commands are to be updated.
1159111603 const ur_exp_command_buffer_update_kernel_launch_desc_t
1159211604 *pUpdateKernelLaunch);
1159311605
@@ -14820,7 +14832,8 @@ typedef struct ur_command_buffer_enqueue_exp_params_t {
1482014832/// @details Each entry is a pointer to the parameter passed to the function;
1482114833/// allowing the callback the ability to modify the parameter's value
1482214834typedef struct ur_command_buffer_update_kernel_launch_exp_params_t {
14823- ur_exp_command_buffer_command_handle_t *phCommand;
14835+ ur_exp_command_buffer_handle_t *phCommandBuffer;
14836+ uint32_t *pnumKernelUpdates;
1482414837 const ur_exp_command_buffer_update_kernel_launch_desc_t *
1482514838 *ppUpdateKernelLaunch;
1482614839} ur_command_buffer_update_kernel_launch_exp_params_t;
0 commit comments