Skip to content

Fix complex CP weights in alternate MTTKRP implementations - #691

Merged
aarmey merged 1 commit into
tensorly:mainfrom
AryanRG:fix-complex-mttkrp-weights
Oct 29, 2026
Merged

aarmey merged 1 commit into
tensorly:mainfrom
AryanRG:fix-complex-mttkrp-weights

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

The einsum and memory-efficient MTTKRP implementations multiply by CP weights without conjugating them, producing incorrect values for complex weights. Conjugate the weights through the existing backend wrappers to match the Hermitian contraction.

Adds regression coverage for complex, real, and omitted weights across all tensor modes.

Local NumPy/einsum and CPU PyTorch suites, Black, sdist/wheel builds, and the wheel regression pass. NumPy/core retains complex-CP failures reproduced on the unmodified base.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.77%. Comparing base (d83c95c) to head (32a5603).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #691      +/-   ##
==========================================
+ Coverage   92.62%   92.77%   +0.14%     
==========================================
  Files         132      133       +1     
  Lines        8790     8825      +35     
==========================================
+ Hits         8142     8187      +45     
+ Misses        648      638      -10     

☔ 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.

@aarmey
aarmey merged commit 6f6e819 into tensorly:main Oct 29, 2026
9 checks passed
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