Add semaphore-aware Sequence evalAsync overloads#463
Add semaphore-aware Sequence evalAsync overloads#463cone-forest wants to merge 2 commits intoKomputeProject:masterfrom
Conversation
Allow submit-level GPU synchronization by letting Sequence submissions wait on and signal Vulkan semaphores without CPU-side waits. This keeps existing evalAsync behavior while adding validation and coverage for the new overload path.
206a63a to
570453d
Compare
|
This looks interesting; but why are we looking to pass this on every Eval? Woudln't it make sense to hvae this at class initialisation? Can you provide more details on your usecase with a few examples so we can asses? Thanks |
|
This makes sense actually. I should also add this to the sequence method for the manager, right? I still have doubts about forcing every submission of a command buffer to a fixed sync objects though. Extending the API to support timeline semaphores would be difficult. But that might not be necessary I will think about this for today as I am still figuring the exact sync mechanism I want to use. Currently it uses a single semaphore between all compute and all graphics. Not sure that's my final design |
|
Ok thank you for sharing a few extra thoughts - in that case I'd say it would be worth thinking about it form the potentail api on how users are expected to use it (ie what are some usecases). This would also help decide whether indeed it's an initialisation function item which would be passed by the manager, or something that is run / overridden by on the execution itself. |
Summary
Sequence::evalAsyncoverloads that accept wait/signal semaphores for submit-level GPU synchronizationevalAsync()behavior by routing to the new overload with empty semaphore listsTest plan
cmake -S . -B build -DKOMPUTE_OPT_BUILD_TESTS=ONcmake --build build -j./build/bin/kompute_tests --gtest_filter=TestSequence.EvalAsyncSemaphoreOverloadSupportsEmptySyncLists:TestSequence.EvalAsyncSemaphoreOverloadValidatesWaitMaskCount