Commit 4e4a1c1
committed
arena: don't drop the inner result perm for owning ToT Scale contractions
Commit 34711c8 made the ToT x scalar Scale contraction always hand an
identity inner perm to make_contraction_arena_plan, so the plan is built
and the perm-free fused scale op is selected, with the inner result perm
applied downstream by op_'s post-processing permute. That is correct for
view (arena) inner cells -- make_total_perm carries the full perm for
them -- but is_contraction_arena_tot_v is also true for owning legacy
TA::Tensor ToT inner cells, and for those make_total_perm carries only
the outer perm. So an owning ToT Scale contraction with a non-identity
inner result permutation lost the inner perm entirely: identity plan +
perm-free op + outer-only total_perm, producing a wrong-inner-layout
result (and, under distributed eval, a malformed result whose deferred
destruction aborted at a later fence).
Mirror the make_total_perm view/owning split here: pass an identity
inner perm only for view cells; for owning cells pass inner(perm_) so
the plan bails (nullopt) on a non-identity inner perm and the per-cell
op applies it, exactly as before 34711c8. Restores einsum_manual/
different_nested_ranks and einsum_tot_t/ilkj_nm_eq_ij_mn_times_kl.1 parent 34711c8 commit 4e4a1c1
1 file changed
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
976 | 990 | | |
977 | 991 | | |
978 | 992 | | |
979 | | - | |
| 993 | + | |
980 | 994 | | |
981 | 995 | | |
982 | 996 | | |
| |||
0 commit comments