Commit ebe61e8
Add torch.cond split-K decode dispatch to Qwen3.5 MoE attention
Runtime dispatch via torch.cond in FullAttention: split-K flash-decoding
for decode (L_q==1) and standard tiled SDPA for prefill (L_q>1). Guard
sdpa_decode_splitk validation behind isinstance(L_q, int) so AOTI tracing
with symbolic shapes doesn't trip the L_q==1 check.
Align sdpa_decode_splitk signature with sdpa (dropout_p, is_causal,
enable_gqa) for drop-in use with torch.cond; unsupported args fail
with clear messages.1 parent 35c7a18 commit ebe61e8
2 files changed
Lines changed: 46 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
1375 | 1377 | | |
| 1378 | + | |
1376 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1377 | 1386 | | |
1378 | 1387 | | |
1379 | 1388 | | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1385 | 1392 | | |
1386 | | - | |
| 1393 | + | |
1387 | 1394 | | |
1388 | | - | |
| 1395 | + | |
1389 | 1396 | | |
1390 | | - | |
| 1397 | + | |
| 1398 | + | |
1391 | 1399 | | |
1392 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1393 | 1418 | | |
1394 | | - | |
1395 | 1419 | | |
1396 | 1420 | | |
1397 | 1421 | | |
| |||
1412 | 1436 | | |
1413 | 1437 | | |
1414 | 1438 | | |
| 1439 | + | |
| 1440 | + | |
1415 | 1441 | | |
| 1442 | + | |
1416 | 1443 | | |
1417 | 1444 | | |
1418 | 1445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
270 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
271 | 275 | | |
272 | | - | |
273 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
| |||
0 commit comments