Skip to content

perf(matrix): improve inf_norm throughput#184

Merged
acgetchell merged 1 commit into
mainfrom
perf/154-inf-norm
Jul 12, 2026
Merged

perf(matrix): improve inf_norm throughput#184
acgetchell merged 1 commit into
mainfrom
perf/154-inf-norm

Conversation

@acgetchell

@acgetchell acgetchell commented Jul 12, 2026

Copy link
Copy Markdown
Owner
  • Check row-sum finiteness once per completed row on the success path.
  • Replay only overflowing rows to preserve the first failing matrix coordinate.
  • Preserve left-to-right accumulation and const evaluation across dimensions.

Closes #154

Summary by CodeRabbit

  • Bug Fixes
    • Improved matrix norm error reporting by identifying the first column where an overflow or invalid value occurs.
    • Preserved left-to-right summation behavior for more predictable floating-point results.
    • Updated and expanded coverage for norm calculations involving overflow and rounding.

- Check row-sum finiteness once per completed row on the success path.
- Replay only overflowing rows to preserve the first failing matrix coordinate.
- Preserve left-to-right accumulation and const evaluation across dimensions.

Closes #154
@acgetchell acgetchell self-assigned this Jul 12, 2026
@acgetchell acgetchell enabled auto-merge July 12, 2026 05:23
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 13715094-5133-4a22-ab55-0c39f2977049

📥 Commits

Reviewing files that changed from the base of the PR and between 9292e32 and dc28f98.

📒 Files selected for processing (1)
  • src/matrix.rs

📝 Walkthrough

Walkthrough

Matrix::inf_norm now identifies the first column where a row’s prefix sum becomes non-finite. Tests update overflow-location expectations and verify that left-to-right summation order remains preserved.

Changes

Infinity-norm diagnostics

Layer / File(s) Summary
Locate the first overflowing column
src/matrix.rs
inf_norm replays absolute-value row summation left-to-right to report the first column causing a non-finite prefix sum.
Update infinity-norm validation
src/matrix.rs
Overflow expectations are updated, and a regression test verifies left-to-right row-sum evaluation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The code matches the perf and error-semantics goals, but the provided context doesn't show the requested focused benchmarks across dimensions. Add or link benchmark results for D=2,3,4,5,8,16,32,64 with before/after comparisons.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: improving Matrix::inf_norm performance.
Out of Scope Changes check ✅ Passed The changes stay focused on Matrix::inf_norm and its tests, with no obvious unrelated scope creep.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/154-inf-norm

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (9292e32) to head (dc28f98).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
+ Coverage   97.81%   97.83%   +0.02%     
==========================================
  Files           8        8              
  Lines        4809     4859      +50     
==========================================
+ Hits         4704     4754      +50     
  Misses        105      105              
Flag Coverage Δ
unittests 97.83% <100.00%> (+0.02%) ⬆️

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.

@acgetchell acgetchell merged commit df7a358 into main Jul 12, 2026
18 checks passed
@acgetchell acgetchell deleted the perf/154-inf-norm branch July 12, 2026 05:28
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.

Investigate Matrix::inf_norm performance

1 participant