Commit 6f7e010
[ROCm][MLA] Fix mypy: narrow rotary_emb/slot_mapping on the fused MLA path
The new rotary_emb: nn.Module | None on the base MLAAttention broke mypy
(3.10-3.13): guard rotary_emb before use in the fused decode branch, narrow
forward_context.slot_mapping to dict, ignore the impl attr assignment, and
assert rotary_emb in the DeepseekV32 (nvidia) subclass that inherits the type.
co-authored by Claude
Signed-off-by: Xavier Aguilar <xavier.aguilarfruto@amd.com>1 parent 2326276 commit 6f7e010
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
903 | | - | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
904 | 908 | | |
| 909 | + | |
905 | 910 | | |
906 | 911 | | |
907 | 912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| |||
0 commit comments