KhronosGroup / KhronosGroup/OpenCL-Docs
Support for Recording Command Buffers Inside Command Buffers
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
A useful future extension for command buffers, which would put them closer to parity with CUDA and HIP graphs would be the ability to add (record) an existing finalised command buffer into another command buffer, potentially multiple times (so long as the resulting executions can never overlap). A command buffer may also find its way into multiple separate command buffers.
Good use cases for this are for interacting with library code. The library can provide a command buffer which performs a certain task which can then be integrated into a larger command buffer which is being constructed by the caller.
However, for this future extension to be possible, some care is needed around the current API to ensure that it does not preclude this functionality going forwards. Specifically, around things such as how command buffers are defined to interact with queues (at the recording and execution stage) and what other guarantees are made about command buffer execution which may not hold if they are embedded.
Contributor guide
Research direction
No files or tests are named. Start by reviewing the current command-buffer and queue execution guarantees in the OpenCL documentation, then trace which API assumptions would be affected by recording a finalized command buffer inside another. Done means the proposed extension’s recording, reuse, overlap, and execution semantics are defined without contradicting existing guarantees.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100