Skip to content

Conversation

@mtfishman
Copy link
Member

This PR enables combining FusionStyles through the interface FusionStyle(::FusionStyle, ::FusionStyle), inspired by the interface for combining BroadcastStyles: https://docs.julialang.org/en/v1/manual/interfaces/#writing-binary-broadcasting-rules. Additionally, this PR combines the fusion styles of the inputs of matricized tensor contraction to determine a common fusion style (which should ensure the bases are compatible, assuming the matricization is defined properly).

Also add ITensorNetworksNext.jl as a downstream test.

This addresses an issue noticed in ITensor/ITensorNetworksNext.jl#27.

In the future, we should add a higher level interface for combining fusion styles based on the rules defined in this PR, see https://github.com/JuliaLang/julia/blob/98519108869cae69fa0622acdb3f1d24e174996d/base/broadcast.jl#L413-L483.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.39%. Comparing base (28e60c0) to head (a1d688f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   84.48%   84.39%   -0.09%     
==========================================
  Files          17       17              
  Lines         696      692       -4     
==========================================
- Hits          588      584       -4     
  Misses        108      108              
Flag Coverage Δ
docs 0.00% <0.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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 closed this Dec 17, 2025
@mtfishman mtfishman reopened this Dec 17, 2025
@mtfishman mtfishman merged commit f542c6e into main Dec 17, 2025
37 of 40 checks passed
@mtfishman mtfishman deleted the mf/combine-fusionstyles branch December 17, 2025 20:40
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.

2 participants