Skip to main content

Module command_list

Module command_list 

Source
Expand description

Host-side Level Zero command-list recording and dispatch planning.

A Level Zero ze_command_list_handle_t is recorded on the host: the application appends memory copies, kernel launches, and barriers, then closes the list and submits it to a queue. The recording itself — validating ordinals, computing ze_group_count_t dispatch dimensions, sequencing barriers and events — is pure host-side logic that this module models as an in-memory CommandListRecorder. The only device-gated step is replaying the recorded commands through zeCommandListAppend*.

This module also provides:

  • GroupCountPlanner — converts a global problem size into the (group_count_x, group_count_y, group_count_z) launch grid for a given workgroup size, mirroring zeKernelSuggestGroupSize arithmetic.
  • CommandQueueGroupTable — selects a compute vs. copy queue-group ordinal from a queried zeDeviceGetCommandQueueGroupProperties table.
  • EventPoolDesc / Barrier — event-pool sizing and barrier dependency construction.
  • ReusableCommandList — models zeCommandListReset + re-record for repeated launches without re-allocation.

Structs§

Barrier
A barrier appended into a command list.
CommandListRecorder
An in-memory recording of a Level Zero command list.
CommandQueueGroupInfo
One entry of zeDeviceGetCommandQueueGroupProperties.
CommandQueueGroupTable
A queried command-queue-group property table for one device.
EventPoolDesc
Descriptor for a zeEventPoolCreate call.
GroupCount
A ze_group_count_t — the number of workgroups launched in each dimension.
GroupCountPlanner
Plans ze_group_count_t launch grids from global problem sizes.
ReusableCommandList
A command list designed for repeated reset-and-re-record launch loops.

Enums§

CommandListState
State of a command list in the host-side model.
EventScope
Memory/host visibility scope for events in a pool (ze_event_pool_flags_t).
RecordedCommand
A single command appended into a CommandListRecorder.