Commit 54c63b3
committed
[feat]: auto-route VSA backend to CuTe BSHD fastpath at tile volume 256
forward() now derives block_elements = math.prod(VSA_TILE_SIZE) and,
when it is 256 and the CuTe entrypoint is importable, calls
video_sparse_attn_bshd directly (inputs already arrive in [B,S,H,D],
so the BHSD transpose round-trip is skipped). The default (4,4,4)
tile keeps the existing 64-element TK/Triton path byte-for-byte.
VSA_TILE_SIZE stays the single module-level constant it already was on
main -- no env var, no per-pipeline plumbing, no metadata/config
threading. Switching to the Blackwell fastpath is a one-line change to
that constant; everything else (build/tile/construct_variable_block_sizes)
reads it unchanged.1 parent 14553b7 commit 54c63b3
1 file changed
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
276 | 283 | | |
277 | 284 | | |
278 | 285 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 286 | | |
| 287 | + | |
| 288 | + | |
285 | 289 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
297 | | - | |
| 300 | + | |
298 | 301 | | |
299 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
0 commit comments