You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement a simple synchronous local HAL scheduling (sibling to task_*) #4680
Systems that have a single processor don't need the fancy task system - they just need a way to run through simple commands kept in a command buffer. Ideally really small systems would compile away all of the HAL but it's a much smaller investment (and keeps code portable) to have a lightweight local-execution HAL backend that just runs synchronously.
This would be similar in nature to what existed before with the async_command_queue (which was async from the host perspective but synchronous from the device perspective) but much much simpler. It's intended for when the host and device are in the same binary/process/bare - in cases where there's a host/device split (no shared memory/independent versioning/different processes/etc) something more involved is required.
This could be made much more efficient; a new version should use iree/hal/local/arena.h for storage and not record any recording-only state (push constants/descriptor sets/etc). The iree/hal/local/task_command_buffer.c does this and only actually commands are recorded. Even that could be made more memory efficient by slicing out the state tracking storage from the block pool and returning it after the iree_hal_command_buffer_end such that only the recorded storage persists.
Unlike in the task system-based one above since this would be unthreaded there's no need to pay attention to any barriers - all commands will execute in the order they are recorded.
Some of the plumbing and the starting point is being done as part of #5508. The big work here (and what is mentioned above) is to add support for command buffer recording and explore pre-compiled command buffers (where we encode a binary structure in the compiler and load it at runtime without needing to issue the VM/HAL calls).
Activity
benvanik commentedon Apr 8, 2021
The old C++ command buffer stuff lives here:
https://github.com/google/iree/blob/2d534397009fb2bc8189c540799be1084c15499b/iree/hal/host/inproc_command_buffer.h#L205
https://github.com/google/iree/blob/2d534397009fb2bc8189c540799be1084c15499b/iree/hal/host/inproc_command_buffer.cc#L125-L138
This could be made much more efficient; a new version should use iree/hal/local/arena.h for storage and not record any recording-only state (push constants/descriptor sets/etc). The iree/hal/local/task_command_buffer.c does this and only actually commands are recorded. Even that could be made more memory efficient by slicing out the state tracking storage from the block pool and returning it after the
iree_hal_command_buffer_endsuch that only the recorded storage persists.Unlike in the task system-based one above since this would be unthreaded there's no need to pay attention to any barriers - all commands will execute in the order they are recorded.
benvanik commentedon Apr 18, 2021
Some of the plumbing and the starting point is being done as part of #5508. The big work here (and what is mentioned above) is to add support for command buffer recording and explore pre-compiled command buffers (where we encode a binary structure in the compiler and load it at runtime without needing to issue the VM/HAL calls).
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers.
Adding experimental synchronous executor using inline command buffers. (
Enable some now-passing HAL CTS tests. (#11537)
Wire frontier tracker advance() and error handling through all HAL dr…
Wire frontier tracker advance() and error handling through all HAL dr…
Wire frontier tracker advance() and error handling through all HAL dr…