[Perf] deepseek-v4.1: Reset request-window tags without a host sync (#45247)

This commit is contained in:
Liangsheng Yin
2026-10-19 15:45:17 -07:00
committed by GitHub
parent 9a949403f1
commit 1238edd954
@@ -234,7 +234,8 @@ class RequestWindow:
loc = slots.to(torch.int64)[:, None] * self.capacity + torch.arange(
self.capacity, device=slots.device
)
self.tags[:, loc.flatten()] = -1
# index_fill_ stays on the device; a scalar index_put waits for the stream.
self.tags.index_fill_(1, loc.flatten(), -1)
self.prepared = None
def activate(self, layout):