@@ -9962,6 +9962,21 @@ typedef struct ur_exp_command_buffer_desc_t {
99629962
99639963} ur_exp_command_buffer_desc_t;
99649964
9965+ ///////////////////////////////////////////////////////////////////////////////
9966+ /// @brief A value that identifies a command inside of a command-buffer, used
9967+ /// for
9968+ /// defining dependencies between commands in the same command-buffer.
9969+ typedef uint32_t ur_exp_command_buffer_sync_point_t;
9970+
9971+ ///////////////////////////////////////////////////////////////////////////////
9972+ /// @brief Handle of Command-Buffer object
9973+ typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
9974+
9975+ ///////////////////////////////////////////////////////////////////////////////
9976+ /// @brief Handle of a Command-Buffer command
9977+ typedef struct ur_exp_command_buffer_command_handle_t_
9978+ *ur_exp_command_buffer_command_handle_t;
9979+
99659980///////////////////////////////////////////////////////////////////////////////
99669981/// @brief Descriptor type for updating a kernel command memobj argument.
99679982typedef struct ur_exp_command_buffer_update_memobj_arg_desc_t {
@@ -10025,6 +10040,8 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1002510040 ur_structure_type_t stype;
1002610041 /// [in][optional] pointer to extension-specific structure
1002710042 const void *pNext;
10043+ /// [in] Handle of the command-buffer kernel command to update.
10044+ ur_exp_command_buffer_command_handle_t hCommand;
1002810045 /// [in][optional] The new kernel handle. If this parameter is nullptr,
1002910046 /// the current kernel handle in `hCommand`
1003010047 /// will be used. If a kernel handle is passed, it must be a valid kernel
@@ -10074,21 +10091,6 @@ typedef struct ur_exp_command_buffer_update_kernel_launch_desc_t {
1007410091
1007510092} ur_exp_command_buffer_update_kernel_launch_desc_t;
1007610093
10077- ///////////////////////////////////////////////////////////////////////////////
10078- /// @brief A value that identifies a command inside of a command-buffer, used
10079- /// for
10080- /// defining dependencies between commands in the same command-buffer.
10081- typedef uint32_t ur_exp_command_buffer_sync_point_t;
10082-
10083- ///////////////////////////////////////////////////////////////////////////////
10084- /// @brief Handle of Command-Buffer object
10085- typedef struct ur_exp_command_buffer_handle_t_ *ur_exp_command_buffer_handle_t;
10086-
10087- ///////////////////////////////////////////////////////////////////////////////
10088- /// @brief Handle of a Command-Buffer command
10089- typedef struct ur_exp_command_buffer_command_handle_t_
10090- *ur_exp_command_buffer_command_handle_t;
10091-
1009210094///////////////////////////////////////////////////////////////////////////////
1009310095/// @brief Create a Command-Buffer object
1009410096///
@@ -11035,74 +11037,84 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
1103511037///
1103611038/// @details
1103711039/// This entry-point is synchronous and may block if the command-buffer is
11038- /// executing when the entry-point is called.
11040+ /// executing when the entry-point is called. On error, none of the updates to
11041+ /// mutable-command objects are preserved.
1103911042///
1104011043/// @returns
1104111044/// - ::UR_RESULT_SUCCESS
1104211045/// - ::UR_RESULT_ERROR_UNINITIALIZED
1104311046/// - ::UR_RESULT_ERROR_DEVICE_LOST
1104411047/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1104511048/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
11046- /// + `NULL == hCommand`
11049+ /// + `NULL == hCommandBuffer`
11050+ /// + `NULL == pUpdateKernelLaunch->hCommand`
1104711051/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1104811052/// + `NULL == pUpdateKernelLaunch`
11053+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
11054+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
11055+ /// + `numKernelUpdates == 0`
1104911056/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
1105011057/// + If
1105111058/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS
11052- /// is not supported by the device, but any of
11053- /// `pUpdateKernelLaunch->numNewMemObjArgs`,
11054- /// `pUpdateKernelLaunch->numNewPointerArgs`, or
11055- /// `pUpdateKernelLaunch->numNewValueArgs` are not zero.
11059+ /// is not supported by the device, and for any of any element of
11060+ /// `pUpdateKernelLaunch` the `numNewMemObjArgs`, `numNewPointerArgs`,
11061+ /// or `numNewValueArgs` members are not zero.
1105611062/// + If
1105711063/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11058- /// not supported by the device but
11059- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is not nullptr.
11064+ /// not supported by the device, and for any element of
11065+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is not nullptr.
1106011066/// + If
1106111067/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE is
11062- /// not supported by the device but
11063- /// `pUpdateKernelLaunch-> pNewLocalWorkSize` is nullptr and
11064- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr.
11068+ /// not supported by the device, and for any element of
11069+ /// `pUpdateKernelLaunch` the ` pNewLocalWorkSize` member is nullptr and
11070+ /// `pNewGlobalWorkSize` is not nullptr.
1106511071/// + If
1106611072/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE
11067- /// is not supported by the device but
11068- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize` is not nullptr
11073+ /// is not supported by the device, and for any element of
11074+ /// `pUpdateKernelLaunch` the ` pNewGlobalWorkSize` member is not nullptr
1106911075/// + If
1107011076/// ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET
11071- /// is not supported by the device but
11072- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` is not nullptr.
11077+ /// is not supported by the device, and for any element of
11078+ /// `pUpdateKernelLaunch` the `pNewGlobalWorkOffset` member is not
11079+ /// nullptr.
1107311080/// + If ::UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE
11074- /// is not supported by the device but `pUpdateKernelLaunch->hNewKernel`
11075- /// is not nullptr.
11081+ /// is not supported by the device, and for any element of
11082+ /// `pUpdateKernelLaunch` the `hNewKernel` member is not nullptr.
1107611083/// - ::UR_RESULT_ERROR_INVALID_OPERATION
1107711084/// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true
11078- /// on creation of the command-buffer `hCommand` belongs to.
11079- /// + If the command-buffer `hCommand` belongs to has not been
11080- /// finalized.
11085+ /// on creation of the `hCommandBuffer`.
11086+ /// + If `hCommandBuffer` has not been finalized.
1108111087/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP
11082- /// + If `hCommand` is not a kernel execution command.
11088+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11089+ /// is not a kernel execution command.
11090+ /// + If for any element of `pUpdateKernelLaunch` the `hCommand` member
11091+ /// was not created from `hCommandBuffer`.
1108311092/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
1108411093/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
1108511094/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE
1108611095/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1108711096/// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION
11088- /// + `pUpdateKernelLaunch->newWorkDim < 1 ||
11089- /// pUpdateKernelLaunch->newWorkDim > 3`
11097+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11098+ /// member is less than 1 or greater than 3.
1109011099/// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
1109111100/// - ::UR_RESULT_ERROR_INVALID_VALUE
11092- /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the
11093- /// `hKernel` or `phKernelAlternatives` parameters of
11094- /// ::urCommandBufferAppendKernelLaunchExp when this command was
11095- /// created.
11096- /// + If `pUpdateKernelLaunch->newWorkDim` is different from the current
11097- /// workDim in `hCommand` and,
11098- /// `pUpdateKernelLaunch-> pNewGlobalWorkSize`, or
11099- /// `pUpdateKernelLaunch->pNewGlobalWorkOffset` are nullptr.
11101+ /// + If for any element of `pUpdateKernelLaunch` the `hNewKernel`
11102+ /// member was not passed to the `hKernel` or `phKernelAlternatives`
11103+ /// parameters of ::urCommandBufferAppendKernelLaunchExp when the
11104+ /// command was created.
11105+ /// + If for any element of `pUpdateKernelLaunch` the `newWorkDim`
11106+ /// member is different from the current workDim in the `hCommand`
11107+ /// member, and ` pNewGlobalWorkSize` or `pNewGlobalWorkOffset` are
11108+ /// nullptr.
1110011109/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
1110111110/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
1110211111UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
11103- /// [in] Handle of the command-buffer kernel command to update.
11104- ur_exp_command_buffer_command_handle_t hCommand,
11105- /// [in] Struct defining how the kernel command is to be updated.
11112+ /// [in] Handle of the command-buffer object.
11113+ ur_exp_command_buffer_handle_t hCommandBuffer,
11114+ /// [in] Length of pUpdateKernelLaunch.
11115+ uint32_t numKernelUpdates,
11116+ /// [in][range(0, numKernelUpdates)] List of structs defining how a
11117+ /// kernel commands are to be updated.
1110611118 const ur_exp_command_buffer_update_kernel_launch_desc_t
1110711119 *pUpdateKernelLaunch);
1110811120
@@ -14191,7 +14203,8 @@ typedef struct ur_command_buffer_enqueue_exp_params_t {
1419114203/// @details Each entry is a pointer to the parameter passed to the function;
1419214204/// allowing the callback the ability to modify the parameter's value
1419314205typedef struct ur_command_buffer_update_kernel_launch_exp_params_t {
14194- ur_exp_command_buffer_command_handle_t *phCommand;
14206+ ur_exp_command_buffer_handle_t *phCommandBuffer;
14207+ uint32_t *pnumKernelUpdates;
1419514208 const ur_exp_command_buffer_update_kernel_launch_desc_t *
1419614209 *ppUpdateKernelLaunch;
1419714210} ur_command_buffer_update_kernel_launch_exp_params_t;
0 commit comments