Command List#
oneAPI Level Zero Specification - Version 1.18.31
Command List Functions#
zeCommandListAppendLaunchMultipleKernelsIndirect#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendLaunchMultipleKernelsIndirect(ze_command_list_handle_t hCommandList, uint32_t numKernels, ze_kernel_handle_t *phKernels, const uint32_t *pCountBuffer, const ze_group_count_t *pLaunchArgumentsBuffer, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Launch multiple kernels over one or more work groups using an array of indirect arguments.
The application must ensure the kernel and events are accessible by the device on which the command list was created.
The application must ensure the array of launch arguments and count buffer are visible to the device on which the command list was created.
The implementation must not access the contents of the array of launch arguments or count buffer as they are free to be modified by either the Host or device up until execution.
This may only be called for a command list created with command queue group ordinal that supports compute.
The application must ensure the command list, kernel and events were created, and the memory was allocated, on the same context.
This function may not be called from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
numKernels – [in] maximum number of kernels to launch
phKernels – [in][range(0, numKernels)] handles of the kernel objects
pCountBuffer – [in] pointer to device memory location that will contain the actual number of kernels to launch; value must be less than or equal to numKernels
pLaunchArgumentsBuffer – [in][range(0, numKernels)] pointer to device buffer that will contain a contiguous array of thread group launch arguments
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] number of events to wait on before launching; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phKernelsnullptr == pCountBuffernullptr == pLaunchArgumentsBuffer
(nullptr == phWaitEvents) && (0 < numWaitEvents)
zeCommandListHostSynchronize#
Added in version 1.6
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListHostSynchronize(ze_command_list_handle_t hCommandList, uint64_t timeout)#
Synchronizes an immediate command list by waiting on the host for the completion of all commands previously submitted to it.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
Waiting on one immediate command list shall not block the concurrent execution of commands appended to other immediate command lists created with either a different ordinal or different index.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the immediate command list
timeout – [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ZE_RESULT_SUCCESS or ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the immediate command list; if
UINT64_MAX, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
timeout expired
ZE_RESULT_ERROR_INVALID_ARGUMENT
handle does not correspond to an immediate command list
zeCommandListGetDeviceHandle#
Added in version 1.9
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetDeviceHandle(ze_command_list_handle_t hCommandList, ze_device_handle_t *phDevice)#
Gets the handle of the device on which the command list was created.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
phDevice – [out] handle of the device on which the command list was created
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phDevice
zeCommandListGetContextHandle#
Added in version 1.9
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetContextHandle(ze_command_list_handle_t hCommandList, ze_context_handle_t *phContext)#
Gets the handle of the context on which the command list was created.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
phContext – [out] handle of the context on which the command list was created
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phContext
zeCommandListGetOrdinal#
Added in version 1.9
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetOrdinal(ze_command_list_handle_t hCommandList, uint32_t *pOrdinal)#
Gets the command queue group ordinal to which the command list is submitted.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pOrdinal – [out] command queue group ordinal to which command list is submitted
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pOrdinal
zeCommandListImmediateGetIndex#
Added in version 1.9
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListImmediateGetIndex(ze_command_list_handle_t hCommandListImmediate, uint32_t *pIndex)#
Gets the command queue index within the group to which the immediate command list is submitted.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandListImmediate – [in] handle of the immediate command list
pIndex – [out] command queue index within the group to which the immediate command list is submitted
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandListImmediate
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pIndex
ZE_RESULT_ERROR_INVALID_ARGUMENT
handle does not correspond to an immediate command list
zeCommandListIsImmediate#
Added in version 1.9
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListIsImmediate(ze_command_list_handle_t hCommandList, ze_bool_t *pIsImmediate)#
Query whether a command list is an immediate command list.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pIsImmediate – [out] Boolean indicating whether the command list is an immediate command list (true) or not (false)
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pIsImmediate
zeCommandListAppendLaunchKernelWithParameters#
Added in version 1.14
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithParameters(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t *pGroupCounts, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Launch kernel over one or more work groups and allow to pass additional parameters.
The application must ensure the kernel and events are accessible by the device on which the command list was created.
This may only be called for a command list created with command queue group ordinal that supports compute.
The application must ensure the command list, kernel and events were created on the same context.
This function may not be called from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
This function allows to pass additional parameters in the form of ze_base_desc_t .
This function can replace zeCommandListAppendLaunchCooperativeKernel with additional parameter ze_command_list_append_launch_kernel_param_cooperative_desc_t .
This function supports both immediate and regular command lists.
- Parameters:
hCommandList – [in] handle of the command list
hKernel – [in] handle of the kernel object
pGroupCounts – [in] thread group launch arguments
pNext – [in][optional] additional parameters passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] number of events to wait on before launching; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandListnullptr == hKernel
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pGroupCounts
(nullptr == phWaitEvents) && (0 < numWaitEvents)
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
when passed additional parameters are invalid or incompatible with the device or command list
zeCommandListAppendLaunchKernelWithArguments#
Added in version 1.14
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, void **pArguments, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Launch kernel over one or more work groups with specifying work group size and all kernel arguments and allow to pass additional extensions.
The application must ensure the kernel and events are accessible by the device on which the command list was created.
This may only be called for a command list created with command queue group ordinal that supports compute.
The application must ensure the command list, kernel and events were created on the same context.
This function may not be called from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
This function supports both immediate and regular command lists.
This function changes kernel state as if separate zeKernelSetGroupSize and zeKernelSetArgumentValue functions were called.
This function allows to pass additional extensions in the form of ze_base_desc_t .
- Parameters:
hCommandList – [in] handle of the command list
hKernel – [in] handle of the kernel object
groupCounts – [in] thread group counts
groupSizes – [in] thread group sizes
pArguments – [in]pointer to an array of pointers
pNext – [in][optional] additional extensions passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] number of events to wait on before launching; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandListnullptr == hKernel
(nullptr == phWaitEvents) && (0 < numWaitEvents)
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
when passed additional extensions are invalid or incompatible with the device or command list
ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION - as per zeKernelSetGroupSize
ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT - as per zeKernelSetArgumentValue
zeCommandListAppendMemoryCopyWithParameters#
Added in version 1.16
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendMemoryCopyWithParameters(ze_command_list_handle_t hCommandList, void *dstptr, const void *srcptr, size_t size, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Copies host, device, or shared memory with additional parameters.
The application must ensure the memory pointed to by dstptr and srcptr is accessible by the device on which the command list was created.
The implementation must not access the memory pointed to by dstptr and srcptr as they are free to be modified by either the Host or device up until execution.
The application must ensure the events are accessible by the device on which the command list was created.
The application must ensure the command list and events were created, and the memory was allocated, on the same context.
The application must not call this function from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
Remark
Analogues
clEnqueueCopyBuffer
clEnqueueReadBuffer
clEnqueueWriteBuffer
clEnqueueSVMMemcpy
- Parameters:
hCommandList – [in] handle of command list
dstptr – [in] pointer to destination memory to copy to
srcptr – [in] pointer to source memory to copy from
size – [in] size in bytes to copy
pNext – [in][optional] additional extensions passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] number of events to wait on before launching; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == dstptrnullptr == srcptr
(nullptr == phWaitEvents) && (0 < numWaitEvents)
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
an extension passed via pNext is not supported
zeCommandListAppendMemoryFillWithParameters#
Added in version 1.16
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendMemoryFillWithParameters(ze_command_list_handle_t hCommandList, void *ptr, const void *pattern, size_t pattern_size, size_t size, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Initializes host, device, or shared memory with additional parameters.
The application must ensure the memory pointed to by ptr is accessible by the device on which the command list was created.
The implementation must not access the memory pointed to by ptr as it is free to be modified by either the Host or device up until execution.
The ptr must be aligned to pattern_size.
The value to initialize memory to is described by the pattern and the pattern size.
The pattern size must be a power-of-two and less than or equal to the
maxMemoryFillPatternSizemember of ze_command_queue_group_properties_t.The size must be a multiple of pattern size.
The application must ensure the events are accessible by the device on which the command list was created.
The application must ensure the command list and events were created, and the memory was allocated, on the same context.
The application must not call this function from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
Remark
Analogues
clEnqueueFillBuffer
clEnqueueSVMMemFill
- Parameters:
hCommandList – [in] handle of command list
ptr – [in] pointer to memory to initialize
pattern – [in] pointer to value to initialize memory to
pattern_size – [in] size in bytes of the value to initialize memory to
size – [in] size in bytes to initialize
pNext – [in][optional] additional extensions passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] number of events to wait on before launching; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == ptrnullptr == pattern
(nullptr == phWaitEvents) && (0 < numWaitEvents)size % pattern_size != 0
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
an extension passed via pNext is not supported
zeCommandListImmediateAppendCommandListsWithParameters#
Added in version 1.16
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListImmediateAppendCommandListsWithParameters(ze_command_list_handle_t hCommandListImmediate, uint32_t numCommandLists, ze_command_list_handle_t *phCommandLists, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Appends command lists to dispatch from an immediate command list with additional parameters.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
The command lists passed to this function in the
phCommandListsargument must be regular command lists (i.e. not immediate command lists).The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandListImmediate – [in] handle of the immediate command list
numCommandLists – [in] number of command lists
phCommandLists – [in][range(0, numCommandLists)] handles of command lists
pNext – [in][optional] additional extensions passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
if not null, this event is signaled after the completion of all appended command lists
numWaitEvents – [in][optional] number of events to wait on before executing appended command lists; must be 0 if nullptr == phWaitEvents
phWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing appended command lists.
if not null, all wait events must be satisfied prior to the start of any appended command list(s)
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandListImmediate
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phCommandLists
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
an extension passed via pNext is not supported
zeCommandListGetFlags#
Added in version 1.17
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListGetFlags(ze_command_list_handle_t hCommandList, ze_command_list_flags_t *pFlags)#
Gets command list creation flags.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pFlags – [out] pointer to flags used during command list creation
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pFlags
zeCommandListImmediateGetFlags#
Added in version 1.17
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListImmediateGetFlags(ze_command_list_handle_t hCommandList, ze_command_queue_flags_t *pFlags)#
Gets immediate command list command queue flags.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pFlags – [out] pointer to flags used during command list creation
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pFlags
ZE_RESULT_ERROR_INVALID_ARGUMENT
handle does not correspond to an immediate command list
zeCommandListImmediateGetMode#
Added in version 1.17
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListImmediateGetMode(ze_command_list_handle_t hCommandList, ze_command_queue_mode_t *pMode)#
Gets immediate command list command queue mode.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pMode – [out] pointer to mode used during command list creation
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pMode
ZE_RESULT_ERROR_INVALID_ARGUMENT
handle does not correspond to an immediate command list
zeCommandListImmediateGetPriority#
Added in version 1.17
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListImmediateGetPriority(ze_command_list_handle_t hCommandList, ze_command_queue_priority_t *pPriority)#
Gets immediate command list command queue priority.
The application must call this function only with command lists created with zeCommandListCreateImmediate.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hCommandList – [in] handle of the command list
pPriority – [out] pointer to priority used during command list creation
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pPriority
ZE_RESULT_ERROR_INVALID_ARGUMENT
handle does not correspond to an immediate command list
zeCommandListAppendHostFunction#
Added in version 1.17
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendHostFunction(ze_command_list_handle_t hCommandList, ze_host_function_callback_t pfnHostFunction, void *pUserData, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)#
Appends a host function call into a command list.
The application must ensure the events are accessible by the device on which the command list was created.
The host function will be executed on the host when the command list reaches this point during execution.
The host function callback must be of type ze_host_function_callback_t.
The host function must not call any Level Zero API functions.
The host function may access USM shared and USM host allocations.
The runtime invokes the host function asynchronously to API calls.
Device may wait for preceding commands to finish before invoking the callback (i.e. callbacks may introduce implicit synchronization point on the device).
Device will wait for all phWaitEvents to be signaled before executing the host function.
The application must not call this function from simultaneous threads with the same command list handle.
- Parameters:
hCommandList – [in] handle of the command list
pfnHostFunction – [in] host function to call, expected to be lightweight and non-blocking
pUserData – [in][optional] user specific data that would be passed to function; neither the runtime nor the device will dereference it
pNext – [in][optional] additional extensions passed to the function
hSignalEvent – [in][optional] handle of the event to signal on completion
numWaitEvents – [in][optional] count of phWaitEvents; must be 0 if
nullptr == phWaitEventsphWaitEvents – [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
(nullptr == phWaitEvents) && (0 < numWaitEvents)
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
an extension passed via pNext is not supported
zeCommandListAppendSignalEventWithParameters#
Added in version 1.18
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendSignalEventWithParameters(ze_command_list_handle_t hCommandList, const void *pNext, ze_event_handle_t hEvent)#
Appends a signal of the event from the device into a command list and allows to pass additional parameters.
The application must ensure the events are accessible by the device on which the command list was created. This requirement does not apply to counter-based events.
For counter-based events, the event may be signaled on any device, regardless of the device used to create the event. When a counter-based event is passed for signaling, it drops its previous tracking point and re-associates with the device on which the command list was created, tracking the new signaling point. No peer-to-peer access between the previously associated device and the new signaling device is required.
The duration of an event created from an event pool that was created using ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined. However, for consistency and orthogonality the event will report correctly as signaled when used by other event API functionality.
The application must ensure the command list and events were created on the same context.
The application must not call this function from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
This function allows to pass additional parameters in the form of ze_base_desc_t .
This function acts like zeCommandListAppendSignalEvent when passing
NULLvalue topNext.
- Parameters:
hCommandList – [in] handle of the command list
pNext – [in][optional] additional parameters passed to the function
hEvent – [in] handle of the event
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandListnullptr == hEvent
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
when passed additional parameters are invalid or incompatible with the device or command list
zeCommandListAppendWaitOnEventsWithParameters#
Added in version 1.18
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendWaitOnEventsWithParameters(ze_command_list_handle_t hCommandList, const void *pNext, uint32_t numEvents, ze_event_handle_t *phEvents)#
Appends wait on event(s) on the device into a command list and allows to pass additional parameters.
The application must ensure the events are accessible by the device on which the command list was created.
For counter-based events, the device on which the command list was created must have peer-to-peer access to the device that last signaled the event. Unlike signaling, waiting on a counter-based event does not re-associate it with another device.
The application must ensure the command list and events were created on the same context.
The application must not call this function from simultaneous threads with the same command list handle.
The implementation of this function should be lock-free.
This function allows to pass additional parameters in the form of ze_base_desc_t .
This function acts like zeCommandListAppendWaitOnEvents when passing
NULLvalue topNext.
- Parameters:
hCommandList – [in] handle of the command list
pNext – [in][optional] additional parameters passed to the function
numEvents – [in] number of events to wait on before continuing
phEvents – [in][range(0, numEvents)] handles of the events to wait on before continuing
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hCommandList
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phEvents
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
when passed additional parameters are invalid or incompatible with the device or command list
Command List Enums#
ze_command_list_flags_t#
Added in version 1.0
-
enum ze_command_list_flag_t#
Values:
-
enumerator ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING#
driver may reorder commands (e.g., kernels, copies) between barriers and synchronization primitives. using this flag may increase Host overhead of zeCommandListClose. therefore, this flag should not be set for low-latency usage-models.
-
enumerator ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT#
driver may perform additional optimizations that increase execution throughput. using this flag may increase Host overhead of zeCommandListClose and zeCommandQueueExecuteCommandLists. therefore, this flag should not be set for low-latency usage-models.
-
enumerator ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY#
command list should be optimized for submission to a single command queue and device engine. driver must disable any implicit optimizations for distributing work across multiple engines. this flag should be used when applications want full control over multi-engine submission and scheduling. This flag is DEPRECATED and implementations are not expected to support this feature.
-
enumerator ZE_COMMAND_LIST_FLAG_IN_ORDER#
commands appended to this command list are executed in-order, with driver implementation enforcing dependencies between them. Application is not required to have the signal event of a given command being the wait event of the next to define an in-order list, and application is allowed to pass signal and wait events to each appended command to implement more complex dependency graphs. Cannot be combined with ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. (since v1.7)
-
enumerator ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE#
this command list may be cloned using zeCommandListCreateCloneExp after zeCommandListClose. (since v1.9)
-
enumerator ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT#
Try to offload copy operations to different engines. Applicable only for compute queues. This is only a hint. Driver may ignore it per append call, based on platform capabilities or internal heuristics. (since v1.15)
-
enumerator ZE_COMMAND_LIST_FLAG_FORCE_UINT32#
Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs.
-
enumerator ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING#
ze_memory_advice_t#
Added in version 1.0
-
enum ze_memory_advice_t#
Supported memory advice hints.
Values:
-
enumerator ZE_MEMORY_ADVICE_SET_READ_MOSTLY#
hint that memory will be read from frequently and written to rarely
-
enumerator ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY#
removes the effect of ZE_MEMORY_ADVICE_SET_READ_MOSTLY
-
enumerator ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION#
hint that the preferred memory location is the specified device
-
enumerator ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION#
removes the effect of ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION
-
enumerator ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY#
hints that memory will mostly be accessed non-atomically
-
enumerator ZE_MEMORY_ADVICE_CLEAR_NON_ATOMIC_MOSTLY#
removes the effect of ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY
-
enumerator ZE_MEMORY_ADVICE_BIAS_CACHED#
hints that memory should be cached
-
enumerator ZE_MEMORY_ADVICE_BIAS_UNCACHED#
hints that memory should be not be cached
-
enumerator ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION#
hint that the preferred memory location is host memory (since v1.7)
-
enumerator ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION#
removes the effect of ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION (since v1.7)
-
enumerator ZE_MEMORY_ADVICE_FORCE_UINT32#
Value marking end of ZE_MEMORY_ADVICE_* ENUMs.
-
enumerator ZE_MEMORY_ADVICE_SET_READ_MOSTLY#
Command List Structures#
ze_command_list_desc_t#
Added in version 1.0
-
struct ze_command_list_desc_t#
Command List descriptor.
Public Members
-
ze_structure_type_t stype#
[in] type of this structure
-
const void *pNext#
[in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
-
uint32_t commandQueueGroupOrdinal#
[in] command queue group ordinal to which this command list will be submitted
-
ze_command_list_flags_t flags#
[in] usage flags. must be 0 (default) or a valid combination of ze_command_list_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput.
-
ze_structure_type_t stype#
ze_copy_region_t#
Added in version 1.0
-
struct ze_copy_region_t#
Copy region descriptor.
Public Members
-
uint32_t originX#
[in] The origin x offset for region in bytes
-
uint32_t originY#
[in] The origin y offset for region in rows
-
uint32_t originZ#
[in] The origin z offset for region in slices
-
uint32_t width#
[in] The region width relative to origin in bytes
-
uint32_t height#
[in] The region height relative to origin in rows
-
uint32_t depth#
[in] The region depth relative to origin in slices. Set this to 0 for 2D copy.
-
uint32_t originX#
ze_image_region_t#
Added in version 1.0
-
struct ze_image_region_t#
Region descriptor.
Public Members
-
uint32_t originX#
[in] The origin x offset for region in pixels
-
uint32_t originY#
[in] The origin y offset for region in pixels
-
uint32_t originZ#
[in] The origin z offset for region in pixels
-
uint32_t width#
[in] The region width relative to origin in pixels
-
uint32_t height#
[in] The region height relative to origin in pixels
-
uint32_t depth#
[in] The region depth relative to origin. For 1D or 2D images, set this to 1.
-
uint32_t originX#
ze_command_list_append_launch_kernel_param_cooperative_desc_t#
Added in version 1.14
-
struct ze_command_list_append_launch_kernel_param_cooperative_desc_t#
Append launch kernel with parameters cooperative descriptor.
Public Members
-
ze_structure_type_t stype#
[in] type of this structure
-
const void *pNext#
[in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
-
ze_bool_t isCooperative#
[in] When true, kernel is treated as cooperative.
-
ze_structure_type_t stype#
ze_group_count_t#
Added in version 1.0
-
struct ze_group_count_t#
Kernel dispatch group count.
ze_group_size_t#
Added in version 1.14
-
struct ze_group_size_t#
Kernel dispatch group sizes.