[Bugfix] Fix cross-batch buffer race corrupting DiskBackend loads (#51667)

Signed-off-by: Fabian Joswig <fjosw@users.noreply.github.com>
Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai>
This commit is contained in:
Fabian Joswig
2026-09-02 08:18:41 +00:00
committed by GitHub
co-authored by Yifan Qiao
parent 01eeb798b6
commit 8052102c21
@@ -334,3 +334,7 @@ class DiskBackend:
ev = torch.Event()
ev.record(stream)
prev_dma_events[buf_slot] = ev
for ev in prev_dma_events:
if ev is not None:
ev.synchronize()