@@ -13915,16 +13915,33 @@ of 0 or 1.
13915
13915
The simultaneous use capability removes this restriction and allows
13916
13916
command-buffers to have a <<pending_count, Pending Count>> greater than 1.
13917
13917
13918
- [[compatible]]
13919
13918
Command-buffers are created using an ordered list of command-queues that
13920
- commands are recorded to and execute on by default.
13921
- These command-queues can be replaced on command-buffer enqueue with
13922
- different command-queues, provided for each element in the replacement list
13923
- the substitute command-queue is compatible with the command-queue used on
13924
- command-buffer creation.
13925
- A _compatible_ command-queue is defined as a command-queue with
13926
- identical properties targeting the same device and in the same OpenCL
13927
- context.
13919
+ commands are recorded to and execute on by default. All these queue objects
13920
+ must share the same context, but may be associated with different devices when
13921
+ the {cl_khr_command_buffer_multi_device_EXT} extension is supported.
13922
+
13923
+ When constructing a command-buffer by appending commands, the queue parameter
13924
+ passed for the command being created is used to set the device with which the
13925
+ command will be associated with, and also inform the scheduling of the command.
13926
+ If the queue is an in-order queue, then an additional dependency is created on the
13927
+ last command appended to the command-buffer using the same queue parameter. If
13928
+ the queue is an out-of-order queue, then no extra dependencies on previous
13929
+ commands using the same queue are created. All queue properties other than
13930
+ {CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE} are ignored for the purposes of command
13931
+ creation, with the exception of any vendor extension defined queue properties
13932
+ that explcitly define semantics for this purpose.
13933
+
13934
+ The command-queues used on command-buffer creation must be replaced on
13935
+ command-buffer enqueue with the command-queues to execute the command-buffer
13936
+ on. These may be different command-queues, provided for each element the
13937
+ substitute command-queue matches the device and context of the command-queue
13938
+ used on command-buffer creation. Each command-queue in the enqueue list must
13939
+ also have the minimum properties defined by
13940
+ {CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR} and no properties
13941
+ which are not reported by
13942
+ {CL_DEVICE_COMMAND_BUFFER_SUPPORTED_QUEUE_PROPERTIES_KHR}. These queue
13943
+ properties have the same execution semantics for {clEnqueueCommandBufferKHR}
13944
+ as other operations enqueued to the queue.
13928
13945
13929
13946
While constructing a command-buffer it is valid for the user to interleave
13930
13947
calls to the same queue which create commands, such as
@@ -13988,7 +14005,7 @@ target the same device.
13988
14005
13989
14006
Commands recorded to different command-queues in the same command-buffer may
13990
14007
be executed concurrently to each other unless synchronized explicitly with
13991
- sync-points.
14008
+ sync-points, barrier commands, or in-order queue implicit dependencies .
13992
14009
Ordering of other commands submitted to the same command-queues as used to
13993
14010
enqueue a command-buffer is the responsibility of the programmer.
13994
14011
A command-buffer enqueue spanning multiple queues can return an event to use
@@ -14189,12 +14206,6 @@ returned in _errcode_ret_:
14189
14206
14190
14207
* {CL_INVALID_COMMAND_QUEUE} if any command-queue in _queues_ is not a
14191
14208
valid command-queue.
14192
- * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if the properties of any command-queue
14193
- in _queues_ contains a property not specified by
14194
- {CL_DEVICE_COMMAND_BUFFER_SUPPORTED_QUEUE_PROPERTIES_KHR}.
14195
- * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if the properties of any
14196
- command-queue in _queues_ does not contain the minimum properties
14197
- specified by {CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR}.
14198
14209
* {CL_INVALID_CONTEXT} if all the command-queues in _queues_ do not have
14199
14210
the same OpenCL context.
14200
14211
* {CL_INVALID_VALUE} if the {cl_khr_command_buffer_multi_device_EXT}
@@ -14327,10 +14338,10 @@ include::{generated}/api/protos/clEnqueueCommandBufferKHR.txt[]
14327
14338
include::{generated}/api/version-notes/clEnqueueCommandBufferKHR.asciidoc[]
14328
14339
14329
14340
* _num_queues_ is the number of command-queues listed in _queues_.
14330
- * _queues_ is a pointer to an ordered list of command-queues <<compatible,
14331
- compatible>> with the command-queues used on recording.
14332
- _queues_ can be `NULL`, in which case the default command-queues used on
14333
- command-buffer creation are used and _num_queues_ must be 0.
14341
+ * _queues_ is a pointer to an ordered list of command-queues to execute the
14342
+ command-buffer on. _queues_ can be `NULL`, in which case the default
14343
+ command-queues used on command-buffer creation are used and _num_queues_
14344
+ must be 0.
14334
14345
* _command_buffer_ refers to a valid command-buffer object.
14335
14346
* _event_wait_list_, _num_events_in_wait_list_ specify events that need to
14336
14347
complete before this particular command can be executed.
@@ -14375,9 +14386,15 @@ execution was successfully queued, or one of the errors below:
14375
14386
_num_queues_ set on _command_buffer_ creation.
14376
14387
* {CL_INVALID_COMMAND_QUEUE} if any element of _queues_ is not a valid
14377
14388
command-queue.
14378
- * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if any element of _queues_ is not
14379
- <<compatible, compatible>> with the command-queue set on
14380
- _command_buffer_ creation at the same list index.
14389
+ * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if the properties of any command-queue
14390
+ in _queues_ contains a property not specified by
14391
+ {CL_DEVICE_COMMAND_BUFFER_SUPPORTED_QUEUE_PROPERTIES_KHR}.
14392
+ * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if the properties of any
14393
+ command-queue in _queues_ does not contain the minimum properties
14394
+ specified by {CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR}.
14395
+ * {CL_INVALID_DEVICE} if any element of _queues_ does not have the same
14396
+ device as the command-queue set on _command_buffer_ creation at the
14397
+ same list index.
14381
14398
* {CL_INVALID_CONTEXT} if any element of _queues_ does not have the same
14382
14399
context as the command-queue set on _command_buffer_ creation at the
14383
14400
same list index.
@@ -15761,22 +15778,18 @@ ifdef::cl_khr_command_buffer_multi_device[]
15761
15778
If the {cl_khr_command_buffer_multi_device_EXT} extension is supported,
15762
15779
platforms reporting the {CL_COMMAND_BUFFER_PLATFORM_REMAP_QUEUES_KHR}
15763
15780
capability support generating a deep copy of a command-buffer with its
15764
- commands remapped to a list of command-queues that are potentially
15765
- <<compatible, incompatible>> with the queues used to create the
15766
- command-buffer.
15767
- That is, the remapped command-buffer can execute on queues that differ in
15768
- terms of properties and/or associated device from the original
15781
+ commands remapped to different devices than the devices used to create the
15782
+ commands. That is, the remapped command-buffer can execute on queues that
15783
+ differ in terms of properties and/or associated device from the original
15769
15784
command-buffer queues.
15770
15785
15771
15786
This functionality is invoked through a new synchronous entry-point
15772
15787
{clRemapCommandBufferKHR} which takes a list of queues to which the commands
15773
- should now target.
15774
- It then returns a command-buffer containing the same commands as the
15775
- original, with the same command dependencies, but targeting different
15776
- queues.
15777
- A list of command handles may also be passed to the entry-point, which
15778
- allows handles to the equivalent commands in the remapped command-buffer to
15779
- be returned by an output parameter.
15788
+ should now target the associated devices of. It then returns a command-buffer
15789
+ containing the same commands as the original, with the same command
15790
+ dependencies, but targeting different devices. A list of command handles may
15791
+ also be passed to the entry-point, which allows handles to the equivalent
15792
+ commands in the remapped command-buffer to be returned by an output parameter.
15780
15793
15781
15794
Device properties restrict remapping possibilities, as existing commands can
15782
15795
have a configuration which is not supported by another device, and so
@@ -15799,7 +15812,7 @@ appear and disappear during runtime.
15799
15812
[open,refpage='clRemapCommandBufferKHR',desc='Create copy of a command-buffer remapped to specified command-queues',type='protos']
15800
15813
--
15801
15814
To create a deep copy of the input command-buffer with the copied commands
15802
- remapped to target the passed command-queues, call the function
15815
+ remapped to target devices of the passed command-queues, call the function
15803
15816
15804
15817
include::{generated}/api/protos/clRemapCommandBufferKHR.txt[]
15805
15818
include::{generated}/api/version-notes/clRemapCommandBufferKHR.asciidoc[]
@@ -15858,8 +15871,6 @@ one of the following error values returned in _errcode_ret_:
15858
15871
* {CL_INVALID_OPERATION} if the platform does not support the
15859
15872
{CL_COMMAND_BUFFER_PLATFORM_AUTOMATIC_REMAP_KHR} flag and _automatic_ is
15860
15873
{CL_TRUE}.
15861
- * {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR} if such an error would be returned
15862
- by passing _queues_ to {clCreateCommandBufferKHR}.
15863
15874
* Any error relating to device support that can be returned by a command
15864
15875
recording entry-point may also be returned.
15865
15876
As a command in _command_buffer_ can have a configuration that is not
0 commit comments