Files
tinygrad/test/backend
Nicolas Pinto 20b658b786 fuse MULACC after MUL->SHL (#14788)
* decompositions: fuse (x << n) + c to MULACC

MUL→SHL converts x*(2^n) to x<<n before MULACC can fuse (x*c)+y.
Add pattern to also fuse (x<<n)+c → MULACC(x, 2^n, c) for backends
that support both MULACC and SHL.

* test: add test_mulacc_shl for SHL->MULACC fusion

* test: relax test_mulacc_unrolled to >= 4

SHL->MULACC fusion now also catches power-of-2 address calculations,
increasing MULACC count from 4 to 6 on PTX. the test's intent is that
each unrolled multiply is individually fused (not grouped), so >= 4
is the correct assertion.

---------

Co-authored-by: Prithvish <deformercoding@gmail.com>
Co-authored-by: Nicolas Pinto <41171+npinto@users.noreply.github.com>
Co-authored-by: Nicolas Pinto <npinto@mbp23.local>
2026-02-16 16:26:44 +08:00
..
2026-02-12 11:09:44 +08:00
2026-02-15 10:55:13 -05:00