Skip to content

Commit 0f2fe91

Browse files
authored
Merge pull request #2131 from Bensuo/ben/command-handle-fix
[EXP][CMDBUF] Make command handle behaviour consistent
2 parents 052bb52 + e50d403 commit 0f2fe91

File tree

15 files changed

+124
-29
lines changed

15 files changed

+124
-29
lines changed

include/ur_api.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8233,6 +8233,10 @@ typedef enum ur_exp_command_buffer_info_t {
82338233
///< The reference count returned should be considered immediately stale.
82348234
///< It is unsuitable for general use in applications. This feature is
82358235
///< provided for identifying memory leaks.
8236+
UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR = 1, ///< [::ur_exp_command_buffer_desc_t] Returns a ::ur_exp_command_buffer_desc_t
8237+
///< with the properties of the command-buffer. Returned values may differ
8238+
///< from those passed on construction if the property was ignored by the
8239+
///< adapter.
82368240
/// @cond
82378241
UR_EXP_COMMAND_BUFFER_INFO_FORCE_UINT32 = 0x7fffffff
82388242
/// @endcond
@@ -8489,6 +8493,7 @@ urCommandBufferFinalizeExp(
84898493
/// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL.
84908494
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
84918495
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
8496+
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "phCommand is not NULL and hCommandBuffer is not updatable."
84928497
UR_APIEXPORT ur_result_t UR_APICALL
84938498
urCommandBufferAppendKernelLaunchExp(
84948499
ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object.
@@ -8517,7 +8522,8 @@ urCommandBufferAppendKernelLaunchExp(
85178522
ur_event_handle_t *phEvent, ///< [out][optional] return an event object that will be signaled by the
85188523
///< completion of this command in the next execution of the
85198524
///< command-buffer.
8520-
ur_exp_command_buffer_command_handle_t *phCommand ///< [out][optional] Handle to this command.
8525+
ur_exp_command_buffer_command_handle_t *phCommand ///< [out][optional] Handle to this command. Only available if the
8526+
///< command-buffer is updatable.
85218527
);
85228528

85238529
///////////////////////////////////////////////////////////////////////////////
@@ -9289,7 +9295,7 @@ urCommandBufferUpdateWaitEventsExp(
92899295
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
92909296
/// + `NULL == hCommandBuffer`
92919297
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
9292-
/// + `::UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT < propName`
9298+
/// + `::UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR < propName`
92939299
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
92949300
/// + If `propName` is not supported by the adapter.
92959301
/// - ::UR_RESULT_ERROR_INVALID_SIZE

include/ur_print.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9847,6 +9847,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_inf
98479847
case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT:
98489848
os << "UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT";
98499849
break;
9850+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR:
9851+
os << "UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR";
9852+
break;
98509853
default:
98519854
os << "unknown enumerator";
98529855
break;
@@ -9875,6 +9878,18 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command
98759878

98769879
os << ")";
98779880
} break;
9881+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: {
9882+
const ur_exp_command_buffer_desc_t *tptr = (const ur_exp_command_buffer_desc_t *)ptr;
9883+
if (sizeof(ur_exp_command_buffer_desc_t) > size) {
9884+
os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_command_buffer_desc_t) << ")";
9885+
return UR_RESULT_ERROR_INVALID_SIZE;
9886+
}
9887+
os << (const void *)(tptr) << " (";
9888+
9889+
os << *tptr;
9890+
9891+
os << ")";
9892+
} break;
98789893
default:
98799894
os << "unknown enumerator";
98809895
return UR_RESULT_ERROR_INVALID_ENUMERATION;

scripts/core/EXP-COMMAND-BUFFER.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Enums
447447
* ${X}_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP
448448
* ${x}_exp_command_buffer_info_t
449449
* ${X}_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT
450+
* ${X}_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR
450451
* ${x}_exp_command_buffer_command_info_t
451452
* ${X}_EXP_COMMAND_BUFFER_COMMAND_INFO_REFERENCE_COUNT
452453

scripts/core/exp-command-buffer.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ etors:
111111
[uint32_t] Reference count of the command-buffer object.
112112
The reference count returned should be considered immediately stale.
113113
It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
114+
- name: DESCRIPTOR
115+
desc: |
116+
[$x_exp_command_buffer_desc_t] Returns a $x_exp_command_buffer_desc_t
117+
with the properties of the command-buffer. Returned values may differ
118+
from those passed on construction if the property was ignored by the
119+
adapter.
114120
--- #--------------------------------------------------------------------------
115121
type: enum
116122
desc: "Command-buffer command query information type"
@@ -380,7 +386,8 @@ params:
380386
desc: "[out][optional] return an event object that will be signaled by the completion of this command in the next execution of the command-buffer."
381387
- type: "$x_exp_command_buffer_command_handle_t*"
382388
name: phCommand
383-
desc: "[out][optional] Handle to this command."
389+
desc: "[out][optional] Handle to this command. Only available if the
390+
command-buffer is updatable."
384391
returns:
385392
- $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
386393
- $X_RESULT_ERROR_INVALID_KERNEL
@@ -403,6 +410,8 @@ returns:
403410
- "If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL."
404411
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
405412
- $X_RESULT_ERROR_OUT_OF_RESOURCES
413+
- $X_RESULT_ERROR_INVALID_OPERATION
414+
- "phCommand is not NULL and hCommandBuffer is not updatable."
406415
--- #--------------------------------------------------------------------------
407416
type: function
408417
desc: "Append a USM memcpy command to a command-buffer object."

source/adapters/cuda/command_buffer.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
432432
ur_exp_command_buffer_sync_point_t *pSyncPoint, ur_event_handle_t *phEvent,
433433
ur_exp_command_buffer_command_handle_t *phCommand) {
434434
// Preconditions
435+
// Command handles can only be obtained from updatable command-buffers
436+
UR_ASSERT(!(phCommand && !hCommandBuffer->IsUpdatable),
437+
UR_RESULT_ERROR_INVALID_OPERATION);
435438
UR_ASSERT(hCommandBuffer->Context == hKernel->getContext(),
436439
UR_RESULT_ERROR_INVALID_KERNEL);
437440
UR_ASSERT(workDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
@@ -1479,6 +1482,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferGetInfoExp(
14791482
switch (propName) {
14801483
case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT:
14811484
return ReturnValue(hCommandBuffer->getExternalReferenceCount());
1485+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: {
1486+
ur_exp_command_buffer_desc_t Descriptor{};
1487+
Descriptor.stype = UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC;
1488+
Descriptor.pNext = nullptr;
1489+
Descriptor.isUpdatable = hCommandBuffer->IsUpdatable;
1490+
Descriptor.isInOrder = false;
1491+
Descriptor.enableProfiling = false;
1492+
1493+
return ReturnValue(Descriptor);
1494+
}
14821495
default:
14831496
assert(!"Command-buffer info request not implemented");
14841497
}

source/adapters/hip/command_buffer.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
330330
std::ignore = phEventWaitList;
331331
std::ignore = phEvent;
332332
// Preconditions
333+
// Command handles can only be obtained from updatable command-buffers
334+
UR_ASSERT(!(phCommand && !hCommandBuffer->IsUpdatable),
335+
UR_RESULT_ERROR_INVALID_OPERATION);
333336
UR_ASSERT(hCommandBuffer->Context == hKernel->getContext(),
334337
UR_RESULT_ERROR_INVALID_KERNEL);
335338
UR_ASSERT(workDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
@@ -1128,6 +1131,15 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferGetInfoExp(
11281131
switch (propName) {
11291132
case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT:
11301133
return ReturnValue(hCommandBuffer->getExternalReferenceCount());
1134+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: {
1135+
ur_exp_command_buffer_desc_t Descriptor{};
1136+
Descriptor.stype = UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC;
1137+
Descriptor.pNext = nullptr;
1138+
Descriptor.isUpdatable = hCommandBuffer->IsUpdatable;
1139+
Descriptor.isInOrder = false, Descriptor.enableProfiling = false;
1140+
1141+
return ReturnValue(Descriptor);
1142+
}
11311143
default:
11321144
assert(!"Command-buffer info request not implemented");
11331145
}

source/adapters/level_zero/command_buffer.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,9 @@ ur_result_t urCommandBufferAppendKernelLaunchExp(
745745
std::ignore = Event;
746746

747747
UR_ASSERT(Kernel->Program, UR_RESULT_ERROR_INVALID_NULL_POINTER);
748+
// Command handles can only be obtained from updatable command-buffers
749+
UR_ASSERT(!(Command && !CommandBuffer->IsUpdatable),
750+
UR_RESULT_ERROR_INVALID_OPERATION);
748751

749752
// Lock automatically releases when this goes out of scope.
750753
std::scoped_lock<ur_shared_mutex, ur_shared_mutex, ur_shared_mutex> Lock(
@@ -775,7 +778,7 @@ ur_result_t urCommandBufferAppendKernelLaunchExp(
775778
// reference count on the kernel, using the kernel saved in CommandData.
776779
UR_CALL(ur::level_zero::urKernelRetain(Kernel));
777780

778-
if (Command && CommandBuffer->IsUpdatable) {
781+
if (Command) {
779782
UR_CALL(createCommandHandle(CommandBuffer, Kernel, WorkDim, LocalWorkSize,
780783
*Command));
781784
}
@@ -1676,14 +1679,14 @@ ur_result_t updateKernelCommand(
16761679
ur_result_t urCommandBufferUpdateKernelLaunchExp(
16771680
ur_exp_command_buffer_command_handle_t Command,
16781681
const ur_exp_command_buffer_update_kernel_launch_desc_t *CommandDesc) {
1682+
UR_ASSERT(Command->CommandBuffer->IsUpdatable,
1683+
UR_RESULT_ERROR_INVALID_OPERATION);
16791684
UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
16801685

16811686
// Lock command, kernel and command buffer for update.
16821687
std::scoped_lock<ur_shared_mutex, ur_shared_mutex, ur_shared_mutex> Guard(
16831688
Command->Mutex, Command->CommandBuffer->Mutex, Command->Kernel->Mutex);
16841689

1685-
UR_ASSERT(Command->CommandBuffer->IsUpdatable,
1686-
UR_RESULT_ERROR_INVALID_OPERATION);
16871690
UR_ASSERT(Command->CommandBuffer->IsFinalized,
16881691
UR_RESULT_ERROR_INVALID_OPERATION);
16891692

@@ -1728,6 +1731,16 @@ urCommandBufferGetInfoExp(ur_exp_command_buffer_handle_t hCommandBuffer,
17281731
switch (propName) {
17291732
case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT:
17301733
return ReturnValue(uint32_t{hCommandBuffer->RefCount.load()});
1734+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: {
1735+
ur_exp_command_buffer_desc_t Descriptor{};
1736+
Descriptor.stype = UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC;
1737+
Descriptor.pNext = nullptr;
1738+
Descriptor.isUpdatable = hCommandBuffer->IsUpdatable;
1739+
Descriptor.isInOrder = hCommandBuffer->IsInOrderCmdList;
1740+
Descriptor.enableProfiling = hCommandBuffer->IsProfilingEnabled;
1741+
1742+
return ReturnValue(Descriptor);
1743+
}
17311744
default:
17321745
assert(!"Command-buffer info request not implemented");
17331746
}

source/adapters/mock/ur_mockddi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8399,8 +8399,9 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
83998399
phEvent, ///< [out][optional] return an event object that will be signaled by the
84008400
///< completion of this command in the next execution of the
84018401
///< command-buffer.
8402-
ur_exp_command_buffer_command_handle_t
8403-
*phCommand ///< [out][optional] Handle to this command.
8402+
ur_exp_command_buffer_command_handle_t *
8403+
phCommand ///< [out][optional] Handle to this command. Only available if the
8404+
///< command-buffer is updatable.
84048405
) try {
84058406
ur_result_t result = UR_RESULT_SUCCESS;
84068407

source/adapters/opencl/command_buffer.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
152152
(void)phEventWaitList;
153153
(void)phEvent;
154154

155+
// Command handles can only be obtained from updatable command-buffers
156+
UR_ASSERT(!(phCommandHandle && !hCommandBuffer->IsUpdatable),
157+
UR_RESULT_ERROR_INVALID_OPERATION);
158+
155159
cl_context CLContext = cl_adapter::cast<cl_context>(hCommandBuffer->hContext);
156160
cl_ext::clCommandNDRangeKernelKHR_fn clCommandNDRangeKernelKHR = nullptr;
157161
UR_RETURN_ON_FAILURE(
@@ -646,6 +650,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferGetInfoExp(
646650
switch (propName) {
647651
case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT:
648652
return ReturnValue(hCommandBuffer->getExternalReferenceCount());
653+
case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: {
654+
ur_exp_command_buffer_desc_t Descriptor{};
655+
Descriptor.stype = UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC;
656+
Descriptor.pNext = nullptr;
657+
Descriptor.isUpdatable = hCommandBuffer->IsUpdatable;
658+
Descriptor.isInOrder = false;
659+
Descriptor.enableProfiling = false;
660+
661+
return ReturnValue(Descriptor);
662+
}
649663
default:
650664
assert(!"Command-buffer info request not implemented");
651665
}

source/loader/layers/tracing/ur_trcddi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7185,8 +7185,9 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
71857185
phEvent, ///< [out][optional] return an event object that will be signaled by the
71867186
///< completion of this command in the next execution of the
71877187
///< command-buffer.
7188-
ur_exp_command_buffer_command_handle_t
7189-
*phCommand ///< [out][optional] Handle to this command.
7188+
ur_exp_command_buffer_command_handle_t *
7189+
phCommand ///< [out][optional] Handle to this command. Only available if the
7190+
///< command-buffer is updatable.
71907191
) {
71917192
auto pfnAppendKernelLaunchExp =
71927193
getContext()->urDdiTable.CommandBufferExp.pfnAppendKernelLaunchExp;

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8108,8 +8108,9 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
81088108
phEvent, ///< [out][optional] return an event object that will be signaled by the
81098109
///< completion of this command in the next execution of the
81108110
///< command-buffer.
8111-
ur_exp_command_buffer_command_handle_t
8112-
*phCommand ///< [out][optional] Handle to this command.
8111+
ur_exp_command_buffer_command_handle_t *
8112+
phCommand ///< [out][optional] Handle to this command. Only available if the
8113+
///< command-buffer is updatable.
81138114
) {
81148115
auto pfnAppendKernelLaunchExp =
81158116
getContext()->urDdiTable.CommandBufferExp.pfnAppendKernelLaunchExp;
@@ -9437,7 +9438,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferGetInfoExp(
94379438
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
94389439
}
94399440

9440-
if (UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT < propName) {
9441+
if (UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR < propName) {
94419442
return UR_RESULT_ERROR_INVALID_ENUMERATION;
94429443
}
94439444

source/loader/ur_ldrddi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7155,8 +7155,9 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
71557155
phEvent, ///< [out][optional] return an event object that will be signaled by the
71567156
///< completion of this command in the next execution of the
71577157
///< command-buffer.
7158-
ur_exp_command_buffer_command_handle_t
7159-
*phCommand ///< [out][optional] Handle to this command.
7158+
ur_exp_command_buffer_command_handle_t *
7159+
phCommand ///< [out][optional] Handle to this command. Only available if the
7160+
///< command-buffer is updatable.
71607161
) {
71617162
ur_result_t result = UR_RESULT_SUCCESS;
71627163

source/loader/ur_libapi.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7573,6 +7573,7 @@ ur_result_t UR_APICALL urCommandBufferFinalizeExp(
75737573
/// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL.
75747574
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
75757575
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
7576+
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "phCommand is not NULL and hCommandBuffer is not updatable."
75767577
ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
75777578
ur_exp_command_buffer_handle_t
75787579
hCommandBuffer, ///< [in] Handle of the command-buffer object.
@@ -7611,8 +7612,9 @@ ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
76117612
phEvent, ///< [out][optional] return an event object that will be signaled by the
76127613
///< completion of this command in the next execution of the
76137614
///< command-buffer.
7614-
ur_exp_command_buffer_command_handle_t
7615-
*phCommand ///< [out][optional] Handle to this command.
7615+
ur_exp_command_buffer_command_handle_t *
7616+
phCommand ///< [out][optional] Handle to this command. Only available if the
7617+
///< command-buffer is updatable.
76167618
) try {
76177619
auto pfnAppendKernelLaunchExp =
76187620
ur_lib::getContext()
@@ -8706,7 +8708,7 @@ ur_result_t UR_APICALL urCommandBufferUpdateWaitEventsExp(
87068708
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
87078709
/// + `NULL == hCommandBuffer`
87088710
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
8709-
/// + `::UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT < propName`
8711+
/// + `::UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR < propName`
87108712
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
87118713
/// + If `propName` is not supported by the adapter.
87128714
/// - ::UR_RESULT_ERROR_INVALID_SIZE

source/ur_api.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6429,6 +6429,7 @@ ur_result_t UR_APICALL urCommandBufferFinalizeExp(
64296429
/// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL.
64306430
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
64316431
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
6432+
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "phCommand is not NULL and hCommandBuffer is not updatable."
64326433
ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
64336434
ur_exp_command_buffer_handle_t
64346435
hCommandBuffer, ///< [in] Handle of the command-buffer object.
@@ -6467,8 +6468,9 @@ ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
64676468
phEvent, ///< [out][optional] return an event object that will be signaled by the
64686469
///< completion of this command in the next execution of the
64696470
///< command-buffer.
6470-
ur_exp_command_buffer_command_handle_t
6471-
*phCommand ///< [out][optional] Handle to this command.
6471+
ur_exp_command_buffer_command_handle_t *
6472+
phCommand ///< [out][optional] Handle to this command. Only available if the
6473+
///< command-buffer is updatable.
64726474
) {
64736475
ur_result_t result = UR_RESULT_SUCCESS;
64746476
return result;
@@ -7382,7 +7384,7 @@ ur_result_t UR_APICALL urCommandBufferUpdateWaitEventsExp(
73827384
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
73837385
/// + `NULL == hCommandBuffer`
73847386
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
7385-
/// + `::UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT < propName`
7387+
/// + `::UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR < propName`
73867388
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
73877389
/// + If `propName` is not supported by the adapter.
73887390
/// - ::UR_RESULT_ERROR_INVALID_SIZE

0 commit comments

Comments
 (0)