Skip to content

[codex] remove legacy crates, add HVP support, and fix oracle replay#650

Merged
shinaoka merged 6 commits intomainfrom
codex/remove-legacy-crates-docs
Apr 6, 2026
Merged

[codex] remove legacy crates, add HVP support, and fix oracle replay#650
shinaoka merged 6 commits intomainfrom
codex/remove-legacy-crates-docs

Conversation

@shinaoka
Copy link
Copy Markdown
Member

@shinaoka shinaoka commented Apr 6, 2026

What changed

  • removed the legacy extension and internal crates that no longer match the current workspace shape, and aligned top-level docs and coverage config with the remaining public surface
  • added higher-order AD plumbing for traced tensors, including extra-root propagation and linalg rule fixes needed for HVP support
  • added an oracle replay test harness for supported ops and fixed the tenferro-side linalg and zero-size AD/runtime bugs it exposed

Why this changed

The branch consolidates the workspace around the current tensor/frontend stack, then hardens AD correctness against oracle-based regression checks. The replay work is intentionally fixing tenferro itself rather than adding downstream skips for supported operations.

User and developer impact

  • higher-order AD paths such as HVP are now covered by regression tests
  • linalg APIs handle batched vector right-hand sides and zero-sized cases more consistently
  • supported oracle replay cases now run end-to-end, which gives a stronger regression gate for future AD and linalg changes

Root causes fixed

  • traced higher-order derivatives were dropping graph roots needed for nested differentiation
  • several linalg JVP/VJP paths had semantic mismatches, especially around triangular solve, QR, and structured matrix handling
  • zero-sized matmul, masking, and batched linalg paths could panic or segfault instead of returning valid empty outputs

Validation

  • cargo fmt --all --check
  • cargo test --workspace --release
  • cargo llvm-cov --workspace --json --output-path coverage.json
  • python3 scripts/check-coverage.py coverage.json
  • cargo doc --workspace --no-deps
  • python3 scripts/check-docs-site.py

shinaoka and others added 5 commits April 6, 2026 12:59
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix extra_roots propagation in jvp() and vjp() for higher-order AD
- Fix extra_roots propagation in einsum for Reverse-over-Reverse HVP
- Fix TriangularSolve linearize to handle matrix tangent (dA term)
- Add 7 HVP integration tests (scalar, vector, SVD, QR)
- Update README with design philosophy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinaoka shinaoka enabled auto-merge (squash) April 6, 2026 09:09
@shinaoka shinaoka merged commit 26c6f32 into main Apr 6, 2026
5 checks passed
@shinaoka shinaoka deleted the codex/remove-legacy-crates-docs branch April 6, 2026 09: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.

1 participant