Skip to content

Do not load StaticArrays in ForwardDiff backend#75

Merged
devmotion merged 1 commit intomasterfrom
dw/forwarddiff
Feb 28, 2023
Merged

Do not load StaticArrays in ForwardDiff backend#75
devmotion merged 1 commit intomasterfrom
dw/forwarddiff

Conversation

@devmotion
Copy link
Member

It was not obvious to me why StaticArrays is loaded in forwarddiff.jl, so let's try to remove it.

Fixes #73.

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.49 🎉

Comparison is base (eb5d913) 83.33% compared to head (9c5adcb) 83.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   83.33%   83.82%   +0.49%     
==========================================
  Files           6        6              
  Lines         474      476       +2     
==========================================
+ Hits          395      399       +4     
+ Misses         79       77       -2     
Impacted Files Coverage Δ
src/forwarddiff.jl 100.00% <ø> (ø)
src/AbstractDifferentiation.jl 79.07% <0.00%> (+0.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ChrisRackauckas
Copy link
Member

ForwardDiff needs to specialize on StaticArrays in order to switch effectively between mutable and immutable diffresults internally. But for AbstractDifferentiation I think the "allocating forms" just hit all of the right StaticArray dispatches so it just works nicely.

@devmotion devmotion merged commit b929457 into master Feb 28, 2023
@devmotion devmotion deleted the dw/forwarddiff branch February 28, 2023 12:19
@devmotion devmotion mentioned this pull request Feb 28, 2023
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.

LoadError: UndefVarError: StaticArrays not defined

2 participants