Skip to content

Permute the contraction result directly into the destination in unmatricizeadd!#182

Merged
mtfishman merged 1 commit into
mainfrom
mf/fuse-unmatricizeadd
Jun 26, 2026
Merged

Permute the contraction result directly into the destination in unmatricizeadd!#182
mtfishman merged 1 commit into
mainfrom
mf/fuse-unmatricizeadd

Conversation

@mtfishman

@mtfishman mtfishman commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

unmatricizeadd! materialized a permuted copy of the matricized contraction result and then added it into the destination. It now permutes that result straight into the destination in a single accumulating pass (via bipermutedimsopadd!), mirroring unmatricize!. This removes one output-sized allocation per contraction: a contraction whose output needs a non-trivial permutation drops from 5× to 4× the output size in temporaries, on par with ITensors and TensorOperations, with no change in results.

…ricizeadd!

unmatricizeadd! materialized a permuted copy of the matricized result and then
added it into the destination. It now permutes that result straight into the
destination in a single accumulating pass via bipermutedimsopadd!, mirroring
unmatricize!, removing one output-sized allocation per contraction.
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.69%. Comparing base (3b34611) to head (955b9f3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   78.59%   78.69%   +0.09%     
==========================================
  Files          20       20              
  Lines         654      657       +3     
==========================================
+ Hits          514      517       +3     
  Misses        140      140              
Flag Coverage Δ
docs 29.82% <100.00%> (-1.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mtfishman mtfishman enabled auto-merge (squash) June 26, 2026 15:49
@mtfishman mtfishman merged commit 289b6c7 into main Jun 26, 2026
26 checks passed
@mtfishman mtfishman deleted the mf/fuse-unmatricizeadd branch June 26, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant