• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

f-dangel / curvlinops / 28752829889
92%

Build:
DEFAULT BRANCH: main
Ran 05 Jul 2026 08:09PM UTC
Jobs 1
Files 53
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jul 2026 07:50PM UTC coverage: 92.348% (+0.2%) from 92.163%
28752829889

push

github

web-flow
[ADD] Detect Linear weights/biases reused across reshape-wrapped matmuls (#308)

* [ADD] Detect Linear weights/biases reused across reshape-wrapped matmuls

Make the FX layer-IO matcher robust to graphs that wrap a Linear's matmul in
transparent, last-dim-preserving shape ops and add the bias only after them --
e.g. Taylor-mode/jet graphs that emit `mm -> _unsafe_view -> squeeze -> add(bias)`
and reuse one weight across several such matmuls (one per Taylor coefficient).

- linear.py: traverse last-dim-preserving transparent ops (view/_unsafe_view/
  reshape/squeeze/unsqueeze) when linking a bias `add` to its matmul, on both the
  weight and bias sides, keeping the two infos identical so they deduplicate.
  Reshapes that alter the last (feature) dimension are still rejected.
- verification.py: treat a usage path as covered when a detected path is a prefix
  of it (the usage reached a matched layer output and merely continues downstream),
  not only when the usage is a prefix of a detected path. Without this, a weight
  reused in matmuls of uneven reshape depth was spuriously reported as uncovered.

Existing behavior is unchanged for standard nn.Module graphs (io_collector and
computer test suites pass). No new public API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [TEST] Cover reshape-wrapped bias detection in the FX layer-IO matcher

Add tests for the pattern the previous commit enables -- a Linear whose bias is
added after transparent, last-dim-preserving reshape ops, and a single weight
reused across matmuls of uneven reshape depth (as emitted by collapsed
Taylor-mode / jet graphs, one matmul per Taylor coefficient).

- test_param_io.py:
  - test_bias_add_through_transparent_reshapes: bias reached through
    `mm -> unsqueeze -> squeeze -> add(bias)` is linked to its layer.
  - test_weight_reused_across_reshape_wrapped_matmuls: one weight over three
    coefficient matmuls (only the forward one biased, via a reshape cha... (continued)

34 of 36 new or added lines in 1 file covered. (94.44%)

1 existing line in 1 file now uncovered.

2667 of 2888 relevant lines covered (92.35%)

0.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
90.37
3.93% curvlinops/computers/io_collector/linear.py

Coverage Regressions

Lines Coverage ∆ File
1
90.37
3.93% curvlinops/computers/io_collector/linear.py
Jobs
ID Job ID Ran Files Coverage
1 28752829889.1 05 Jul 2026 08:09PM UTC 53
92.35
GitHub Action Run
Source Files on build 28752829889
  • Tree
  • List 53
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 34783a5f on github
  • Prev Build on main (#28679515187)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc