@@ -9961,6 +9961,21 @@ typedef struct ur_exp_command_buffer_desc_t {
99619961
99629962} ur_exp_command_buffer_desc_t;
99639963
9964+ ///////////////////////////////////////////////////////////////////////////////
9965+ /// @brief A value that identifies a command inside of a command-buffer, used
9966+ /// for
9967+ /// defining dependencies between commands in the same command-buffer.
9968+ typedef uint32_t ur_exp_command_buffer_sync_point_t;
9969+
9970+ ///////////////////////////////////////////////////////////////////////////////
9971+ /// @brief Handle of Command-Buffer object
9972+ typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
9973+
9974+ ///////////////////////////////////////////////////////////////////////////////
9975+ /// @brief Handle of a Command-Buffer command
9976+ typedef struct ur_exp_command_buffer_command_handle_t_
9977+ *ur_exp_command_buffer_command_handle_t;
9978+
99649979///////////////////////////////////////////////////////////////////////////////
99659980/// @brief Descriptor type for updating a kernel command memobj argument.
99669981typedef struct ur_exp_command_buffer_update_memobj_arg_desc_t {
@@ -10024,6 +10039,8 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1002410039 ur_structure_type_t stype;
1002510040 /// [in][optional] pointer to extension-specific structure
1002610041 const void *pNext;
10042+ /// [in] Handle of the command-buffer kernel command to update.
10043+ ur_exp_command_buffer_command_handle_t hCommand;
1002710044 /// [in][optional] The new kernel handle. If this parameter is nullptr,
1002810045 /// the current kernel handle in `hCommand`
1002910046 /// will be used. If a kernel handle is passed, it must be a valid kernel
@@ -10073,21 +10090,6 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1007310090
1007410091} ur_exp_command_buffer_update_kernel_launch_desc_t;
1007510092
10076- ///////////////////////////////////////////////////////////////////////////////
10077- /// @brief A value that identifies a command inside of a command-buffer, used
10078- /// for
10079- /// defining dependencies between commands in the same command-buffer.
10080- typedef uint32_t ur_exp_command_buffer_sync_point_t;
10081-
10082- ///////////////////////////////////////////////////////////////////////////////
10083- /// @brief Handle of Command-Buffer object
10084- typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
10085-
10086- ///////////////////////////////////////////////////////////////////////////////
10087- /// @brief Handle of a Command-Buffer command
10088- typedef struct ur_exp_command_buffer_command_handle_t_
10089- *ur_exp_command_buffer_command_handle_t;
10090-
1009110093///////////////////////////////////////////////////////////////////////////////
1009210094/// @brief Create a Command-Buffer object
1009310095///
@@ -11034,74 +11036,84 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
1103411036///
1103511037/// @details
1103611038/// This entry-point is synchronous and may block if the command-buffer is
11037- /// executing when the entry-point is called.
11039+ /// executing when the entry-point is called. On error, none of the updates to
11040+ /// mutable-command objects are preserved.
1103811041///
1103911042/// @returns
1104011043/// - ::UR_RESULT_SUCCESS
1104111044/// - ::UR_RESULT_ERROR_UNINITIALIZED
1104211045/// - ::UR_RESULT_ERROR_DEVICE_LOST
1104311046/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1104411047/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
11045- /// + `NULL == hCommand`
11048+ /// + `NULL == hCommandBuffer`
11049+ /// + `NULL == pUpdateKernelLaunch->hCommand`
1104611050/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1104711051/// + `NULL == pUpdateKernelLaunch`
11052+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
11053+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
11054+ /// + `numKernelUpdates == 0`
1104811055/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
1104911056/// + If
1105011057/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS
11051- /// is not supported by the device, but any of
11052- /// `pUpdateKernelLaunch->numNewMemObjArgs`,
11053- /// `pUpdateKernelLaunch->numNewPointerArgs`, or
11054- /// `pUpdateKernelLaunch->numNewValueArgs` are not zero.
11058+ /// is not supported by the device, and for any of any element of
11059+ /// `pUpdateKernelLaunch` the `numNewMemObjArgs`, `numNewPointerArgs`,
11060+ /// or `numNewValueArgs` members are not zero.
1105511061/// + If
1105611062/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11057- /// not supported by the device but
11058- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is not nullptr.
11063+ /// not supported by the device, and for any element of
11064+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is not nullptr.
1105911065/// + If
1106011066/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11061- /// not supported by the device but
11062- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is nullptr and
11063- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr.
11067+ /// not supported by the device, and for any element of
11068+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is nullptr and
11069+ /// `pNewGlobalWorkSize` is not nullptr.
1106411070/// + If
1106511071/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE
11066- /// is not supported by the device but
11067- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr
11072+ /// is not supported by the device, and for any element of
11073+ /// `pUpdateKernelLaunch` the ` pNewGlobalWorkSize` member is not nullptr
1106811074/// + If
1106911075/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET
11070- /// is not supported by the device but
11071- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` is not nullptr.
11076+ /// is not supported by the device, and for any element of
11077+ /// `pUpdateKernelLaunch` the `pNewGlobalWorkOffset` member is not
11078+ /// nullptr.
1107211079/// + If ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE
11073- /// is not supported by the device but `pUpdateKernelLaunch->hNewKernel`
11074- /// is not nullptr.
11080+ /// is not supported by the device, and for any element of
11081+ /// `pUpdateKernelLaunch` the `hNewKernel` member is not nullptr.
1107511082/// - ::UR_RESULT_ERROR_INVALID_OPERATION
1107611083/// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true
11077- /// on creation of the command-buffer `hCommand` belongs to.
11078- /// + If the command-buffer `hCommand` belongs to has not been
11079- /// finalized.
11084+ /// on creation of the `hCommandBuffer`.
11085+ /// + If `hCommandBuffer` has not been finalized.
1108011086/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP
11081- /// + If `hCommand` is not a kernel execution command.
11087+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11088+ /// is not a kernel execution command.
11089+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11090+ /// was not created from `hCommandBuffer`.
1108211091/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
1108311092/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
1108411093/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE
1108511094/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1108611095/// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION
11087- /// + `pUpdateKernelLaunch->newWorkDim < 1 ||
11088- /// pUpdateKernelLaunch->newWorkDim > 3`
11096+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11097+ /// member is less than 1 or greater than 3.
1108911098/// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
1109011099/// - ::UR_RESULT_ERROR_INVALID_VALUE
11091- /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the
11092- /// `hKernel` or `phKernelAlternatives` parameters of
11093- /// ::urCommandBufferAppendKernelLaunchExp when this command was
11094- /// created.
11095- /// + If `pUpdateKernelLaunch->newWorkDim` is different from the current
11096- /// workDim in `hCommand` and,
11097- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize`, or
11098- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` are nullptr.
11100+ /// + If for any element of `pUpdateKernelLaunch` the `hNewKernel`
11101+ /// member was not passed to the `hKernel` or `phKernelAlternatives`
11102+ /// parameters of ::urCommandBufferAppendKernelLaunchExp when the
11103+ /// command was created.
11104+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11105+ /// member is different from the current workDim in the `hCommand`
11106+ /// member, and ` pNewGlobalWorkSize` or `pNewGlobalWorkOffset` are
11107+ /// nullptr.
1109911108/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
1110011109/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
1110111110UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
11102- /// [in] Handle of the command-buffer kernel command to update.
11103- ur_exp_command_buffer_command_handle_t hCommand,
11104- /// [in] Struct defining how the kernel command is to be updated.
11111+ /// [in] Handle of the command-buffer object.
11112+ ur_exp_command_buffer_handle_t hCommandBuffer,
11113+ /// [in] Length of pUpdateKernelLaunch.
11114+ uint32_t numKernelUpdates,
11115+ /// [in][range(0, numKernelUpdates)] List of structs defining how a
11116+ /// kernel commands are to be updated.
1110511117 const ur_exp_command_buffer_update_kernel_launch_desc_t
1110611118 *pUpdateKernelLaunch);
1110711119
@@ -14190,7 +14202,8 @@ typedef struct ur_command_buffer_enqueue_exp_params_t {
1419014202/// @details Each entry is a pointer to the parameter passed to the function;
1419114203/// allowing the callback the ability to modify the parameter's value
1419214204typedef struct ur_command_buffer_update_kernel_launch_exp_params_t {
14193- ur_exp_command_buffer_command_handle_t *phCommand;
14205+ ur_exp_command_buffer_handle_t *phCommandBuffer;
14206+ uint32_t *pnumKernelUpdates;
1419414207 const ur_exp_command_buffer_update_kernel_launch_desc_t *
1419514208 *ppUpdateKernelLaunch;
1419614209} ur_command_buffer_update_kernel_launch_exp_params_t;
0 commit comments