Commit 28c68b9
[perf]: hand the VSA gate to video_sparse_attn as a transposed view
The 64-tile BHSD path copied gate_compress into a contiguous BHSD tensor on
every call. The coarse/sparse combine views the gate at block resolution,
which never needs contiguity, so the transposed BSHD view is passed as is.
This saves one full-sequence copy per attention layer with bit-identical
output. On a GB200 at 1x39936x12x128 (Wan 1.3B, 480p) the per-call peak
drops from 639.8 to 521.8 MiB and latency from 11.64 to 11.29 ms.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NjFimeedTQWxgqSzP5xo4j1 parent f9ff387 commit 28c68b9
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
334 | | - | |
| 337 | + | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
| |||
0 commit comments