@@ -10446,6 +10446,21 @@ typedef struct ur_exp_command_buffer_desc_t {
10446
10446
10447
10447
} ur_exp_command_buffer_desc_t;
10448
10448
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
+
10449
10464
///////////////////////////////////////////////////////////////////////////////
10450
10465
/// @brief Descriptor type for updating a kernel command memobj argument.
10451
10466
typedef 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 {
10509
10524
ur_structure_type_t stype;
10510
10525
/// [in][optional] pointer to extension-specific structure
10511
10526
const void *pNext;
10527
+ /// [in] Handle of the command-buffer kernel command to update.
10528
+ ur_exp_command_buffer_command_handle_t hCommand;
10512
10529
/// [in][optional] The new kernel handle. If this parameter is nullptr,
10513
10530
/// the current kernel handle in `hCommand`
10514
10531
/// 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 {
10558
10575
10559
10576
} ur_exp_command_buffer_update_kernel_launch_desc_t;
10560
10577
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
-
10576
10578
///////////////////////////////////////////////////////////////////////////////
10577
10579
/// @brief Create a Command-Buffer object
10578
10580
///
@@ -11520,74 +11522,84 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
11520
11522
///
11521
11523
/// @details
11522
11524
/// 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.
11524
11527
///
11525
11528
/// @returns
11526
11529
/// - ::UR_RESULT_SUCCESS
11527
11530
/// - ::UR_RESULT_ERROR_UNINITIALIZED
11528
11531
/// - ::UR_RESULT_ERROR_DEVICE_LOST
11529
11532
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
11530
11533
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
11531
- /// + `NULL == hCommand`
11534
+ /// + `NULL == hCommandBuffer`
11535
+ /// + `NULL == pUpdateKernelLaunch->hCommand`
11532
11536
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
11533
11537
/// + `NULL == pUpdateKernelLaunch`
11538
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
11539
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
11540
+ /// + `numKernelUpdates == 0`
11534
11541
/// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE
11535
11542
/// + If
11536
11543
/// ::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.
11541
11547
/// + If
11542
11548
/// ::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.
11545
11551
/// + If
11546
11552
/// ::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.
11550
11556
/// + If
11551
11557
/// ::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
11554
11560
/// + If
11555
11561
/// ::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.
11558
11565
/// + 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.
11561
11568
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
11562
11569
/// + 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.
11566
11572
/// - ::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`.
11568
11577
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
11569
11578
/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
11570
11579
/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE
11571
11580
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
11572
11581
/// - ::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.
11575
11584
/// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
11576
11585
/// - ::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.
11585
11594
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
11586
11595
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
11587
11596
UR_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.
11591
11603
const ur_exp_command_buffer_update_kernel_launch_desc_t
11592
11604
*pUpdateKernelLaunch);
11593
11605
@@ -14820,7 +14832,8 @@ typedef struct ur_command_buffer_enqueue_exp_params_t {
14820
14832
/// @details Each entry is a pointer to the parameter passed to the function;
14821
14833
/// allowing the callback the ability to modify the parameter's value
14822
14834
typedef 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;
14824
14837
const ur_exp_command_buffer_update_kernel_launch_desc_t *
14825
14838
*ppUpdateKernelLaunch;
14826
14839
} ur_command_buffer_update_kernel_launch_exp_params_t;
0 commit comments