Code Optimizations and Reverse AD support#75
Open
jmurphy6895 wants to merge 7 commits intoJuliaSpaceMissionDesign:mainfrom
Open
Code Optimizations and Reverse AD support#75jmurphy6895 wants to merge 7 commits intoJuliaSpaceMissionDesign:mainfrom
jmurphy6895 wants to merge 7 commits intoJuliaSpaceMissionDesign:mainfrom
Conversation
jackyarndley
added a commit
to jackyarndley/FrameTransformations.jl
that referenced
this pull request
May 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jackyarndley
added a commit
to jackyarndley/FrameTransformations.jl
that referenced
this pull request
May 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jackyarndley
added a commit
to jackyarndley/FrameTransformations.jl
that referenced
this pull request
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added compile_rotation, compile_translation, and compile_direction — an opt-in API that extracts raw closures from the internal FunctionWrapper layer, producing zero-overhead, AD-transparent callables for use in hot loops (e.g., ODE right-hand sides).
Added ChainRulesCore and Mooncake package extensions that define rrule pullbacks for all 12 public transformation functions (vector3/6/9/12, rotation3/6/9/12, direction3/6/9/12), enabling reverse-mode AD through Zygote and Mooncake.
Cached graph path lookups inside FrameSystem so that repeated transformation calls no longer re-traverse the graph on every evaluation. The cache is lazily rebuilt after topology changes.
Fixed root-node self-edge bug (!isnothing(parentid) → parentid != id), fix Direction{O} → Translation{O} in direction construction, and relax Vararg{<:Number} → Vararg{Number} in Translation constructors.
New ad_rules.jl tests: Zygote and Mooncake gradients match ForwardDiff/FiniteDiff
New compiled.jl tests: compiled callables match FrameSystem outputs across identity, multi-hop, reverse, cross-axes, and order-selection cases; ForwardDiff differentiates through compiled callables