Skip to content

test: verify iterative AD with eval() mid-loop (#654)#656

Merged
shinaoka merged 1 commit intomainfrom
test/iterative-ad-654
Apr 8, 2026
Merged

test: verify iterative AD with eval() mid-loop (#654)#656
shinaoka merged 1 commit intomainfrom
test/iterative-ad-654

Conversation

@shinaoka
Copy link
Copy Markdown
Member

@shinaoka shinaoka commented Apr 8, 2026

Summary

  • Add integration test tenferro/tests/iterative_ad.rs verifying that iterative AD works correctly when eval() is called mid-loop for convergence checks
  • Uses scalar fixed-point iteration x_{k+1} = a * cos(x_k) with parameter a
  • Verifies 4 properties from test: verify iterative AD works with eval() mid-loop #654: graph continuity after eval(), gradient correctness vs finite differences, eval_all correctness for primal+gradient, and linear graph growth

Test plan

  • All 4 new tests pass (cargo test -p tenferro --test iterative_ad --release)
  • Full workspace tests pass (cargo test --workspace --release)
  • Formatting clean (cargo fmt --all --check)
  • Docs build (cargo doc --workspace --no-deps)
  • Coverage thresholds met (pre-existing buffer_pool.rs failure unchanged)

Closes #654

🤖 Generated with Claude Code

Add integration tests for scalar fixed-point iteration x_{k+1} = a*cos(x_k)
where eval() is called mid-loop for convergence checks and grad()
differentiates through all unrolled iterations.

Verifies: graph continuity after eval(), gradient correctness vs finite
differences, eval_all correctness for primal+gradient, and linear graph growth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinaoka shinaoka enabled auto-merge (squash) April 8, 2026 03:36
@shinaoka shinaoka merged commit 5d893d4 into main Apr 8, 2026
7 checks passed
@shinaoka shinaoka deleted the test/iterative-ad-654 branch April 8, 2026 03: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.

test: verify iterative AD works with eval() mid-loop

1 participant