Repository navigation
Commit 2c560b1
committed
[XNNPACK] Reject addmm with non-default alpha or beta
torch.addmm(input, mat1, mat2, beta=b, alpha=a) computes
b * input + a * (mat1 @ mat2), but the XNNPACK lowering of addmm ignores
alpha and beta. AddmmConfig accepted such an addmm whenever its weight and
bias were static params, so the delegate silently computed
mat1 @ mat2 + input. It now rejects them, and the addmm runs on the portable
kernels.
This change was authored with Claude Code.1 parent 4628b2b commit 2c560b1
2 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
482 | 488 | | |
483 | 489 | | |
484 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
785 | 801 | | |
786 | 802 | | |
787 | 803 | | |
| |||
0 commit comments