Skip to content

[Perf] Adds numeric optimizations and algebraic rewrites#35

Closed
e-strauss wants to merge 1 commit into
deem-data:mainfrom
e-strauss:logical-rewrite
Closed

[Perf] Adds numeric optimizations and algebraic rewrites#35
e-strauss wants to merge 1 commit into
deem-data:mainfrom
e-strauss:logical-rewrite

Conversation

@e-strauss
Copy link
Copy Markdown
Collaborator

[Perf] Adds numeric optimizations and algebraic rewrites

Introduces specialized numeric operation types to the logical optimizer to better represent mathematical functions within the computation graph.

Implements an algebraic rewrite pass that detects and eliminates redundant inverse operation chains, such as log-exp and exp-log pairs, reducing unnecessary computation. As mentioned in #34.

Updates the optimizer configuration to integrate these new transformation steps and includes tests to verify the simplification logic.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 97.87234% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
stratum/logical_optimizer/_numeric_ops.py 96.29% 1 Missing and 1 partial ⚠️
Flag Coverage Δ
unittests 82.11% <97.87%> (+1.37%) ⬆️

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

Files with missing lines Coverage Δ
stratum/logical_optimizer/_algebraic_rewrites.py 100.00% <100.00%> (ø)
stratum/logical_optimizer/_optimize.py 97.82% <100.00%> (+7.29%) ⬆️
stratum/logical_optimizer/_numeric_ops.py 96.29% <96.29%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Introduces specialized numeric operation types to the logical optimizer to better represent mathematical functions within the computation graph.

Implements an algebraic rewrite pass that detects and eliminates redundant inverse operation chains, such as log-exp and exp-log pairs, reducing unnecessary computation. As mentioned in deem-data#34.

Updates the optimizer configuration to integrate these new transformation steps and includes tests to verify the simplification logic.
@e-strauss e-strauss marked this pull request as ready for review March 28, 2026 12:00
@e-strauss e-strauss requested a review from phaniarnab March 28, 2026 12:01
Comment thread stratum/logical_optimizer/_algebraic_rewrites.py
Comment thread stratum/logical_optimizer/_numeric_ops.py
Comment thread stratum/logical_optimizer/_optimize.py
@e-strauss e-strauss closed this in 264ed7e Mar 30, 2026
@e-strauss e-strauss deleted the logical-rewrite branch March 30, 2026 14:45
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