Latency bounds for concurrent host-thread submissions to a shared OpenCL out-of-order queue
0 reputation · 28 Jun 2025, 06:55 UTC
0 reputation · 28 Jun 2025, 06:55 UTC
A host application uses a single OpenCL context with an out-of-order command queue. Multiple host threads call clEnqueueNDRangeKernel concurrently, each with its own event, and later wait via clWaitForEvents. Under single-threaded submission the enqueue-to-completion interval is stable, but the design goal is to keep per-command latency predictable as the number of submitting threads grows.
The OpenCL specification permits concurrent submissions from multiple host threads to a shared context, but it does not appear to define an upper bound on the latency a runtime may add when serializing internal queue access or inserting implicit synchronization points. clEnqueueMarker and clEnqueueBarrier create ordering points, yet their latency relative to concurrently submitted commands is also unspecified. Vendor behavior is documented as implementation-defined, so any bound observed on one driver (e.g., Intel Compute Runtime vs. an NVIDIA OpenCL implementation) may not transfer.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.