Skip to content

Commit ee173e9

Browse files
committed
Explain the stream-scoped slot reuse rule in plain words
1 parent f200f00 commit ee173e9

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_strategies.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,18 @@ class _AsyncRenderStrategy(_RenderStrategy):
244244
Rendering then overlaps the next step's simulation and Python work. Camera outputs are one
245245
step stale.
246246
247-
Transform staging always uses two slots. A finished write op is only a fence in the CUDA
248-
stream the write named. Work on other streams is not ordered after OVRTX's read. Slot refills
249-
are safe because they run on the same stream that every write names. A refill from any other
250-
stream would race the read.
247+
Transform staging always uses two slots, so one slot can be refilled while the other still
248+
backs the frame in flight.
249+
250+
Refilling a slot buffer is safe under one condition, and it is narrower than it looks. OVRTX
251+
can still be reading a buffer on the GPU after its write op completes. A completed write op
252+
guarantees one thing: OVRTX has planted a wait in the CUDA stream that the write named. GPU
253+
work that enters that stream afterwards starts only after OVRTX has finished reading. GPU work
254+
on any other stream is not held back and could overwrite the buffer during the read.
255+
256+
The refill kernels run on the device's current Warp stream, and every write names that same
257+
stream, so the wait covers them. Enqueue any work that touches a slot buffer on that stream
258+
and no other.
251259
"""
252260

253261
# See :meth:`_create_slots` for why two is always enough.

0 commit comments

Comments
 (0)