Skip to content

perf: reduce contraction materialization overhead - #39

Merged
GiggleLiu merged 6 commits into
mainfrom
codex/contraction-performance-improvement
Apr 12, 2026
Merged

perf: reduce contraction materialization overhead#39
GiggleLiu merged 6 commits into
mainfrom
codex/contraction-performance-improvement

Conversation

@GiggleLiu

Copy link
Copy Markdown
Collaborator

Summary

  • add layout-aware Standard GEMM fast paths for unbatched and batched CPU contractions
  • reuse scratch buffers during contraction materialization and strengthen CPU/backend regression coverage
  • let optimized roots emit final output order directly when finalization would only permute indices

Test Plan

  • make check
  • targeted regression tests from the implementation plan
  • cargo bench --bench binary (repo has no bench target named binary)
  • make bench-network (repo has no bench-network target)
  • python3 benchmarks/compare.py (benchmarks/compare.py is absent)
  • samply record cargo run --release --example profile_network -- --scenario 3reg_150 --iterations 1 --output /tmp/omeinsum-profile-network-after.json (repo has no profile_network example)

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.13929% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/backend/cpu/contract.rs 92.56% 20 Missing ⚠️
src/einsum/engine.rs 77.08% 11 Missing ⚠️
src/backend/cpu/mod.rs 98.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@GiggleLiu
GiggleLiu merged commit 143b94d into main Apr 12, 2026
6 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