Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using ADTypes for AD choice #2508

Merged
merged 88 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
dc00dc2
Use ADTypes for AD choice
jClugstor Oct 31, 2024
32c24c7
change some docstrings
jClugstor Oct 31, 2024
26de240
change another docstring
jClugstor Oct 31, 2024
8341a60
add ADTypes to libs that need it
jClugstor Oct 31, 2024
e3b5c17
more ADTypes adding
jClugstor Oct 31, 2024
8e5d1c8
make sure to import AbstractADType
jClugstor Oct 31, 2024
72e815a
import bool_to_ADType
jClugstor Oct 31, 2024
aa9b21f
missed one
jClugstor Oct 31, 2024
1cf1b74
needed for remake to work
jClugstor Oct 31, 2024
b7d02d1
more imports
jClugstor Nov 4, 2024
2be3ad8
use AD.fdtype for derivative, change alg_autodiff to get AD
jClugstor Nov 4, 2024
c69f857
switch to using _process_AD_choice
jClugstor Nov 5, 2024
602214b
erroneous )
jClugstor Nov 5, 2024
d50ca99
need to change to get the ADType type from alg_autodiff, then use in …
jClugstor Nov 5, 2024
427ed53
need nameofs
jClugstor Nov 5, 2024
34f3c36
no need to use CS now I thinkg
jClugstor Nov 5, 2024
4d1a864
fix getting chunksize
jClugstor Nov 5, 2024
c1111bc
fix bools
jClugstor Nov 5, 2024
5db75a6
change prepare_alg
jClugstor Nov 5, 2024
7be088e
import _get_fwd_tag
jClugstor Nov 5, 2024
a961a6b
dumb typo
jClugstor Nov 6, 2024
54abcb5
get the correct fdtype
jClugstor Nov 6, 2024
458f6ba
path for just chunksize
jClugstor Nov 6, 2024
02a843f
need to account for when chunksize is nothing
jClugstor Nov 6, 2024
6d23e17
no println
jClugstor Nov 6, 2024
914641a
no prints
jClugstor Nov 6, 2024
4fe1ac0
stop print
jClugstor Nov 6, 2024
ee4bd4c
use constructorof here
jClugstor Nov 6, 2024
048c5aa
fix prepare_alg
jClugstor Nov 7, 2024
5d1a9a1
change default alg
jClugstor Nov 7, 2024
0d6f685
fix the tests to use ADTypes
jClugstor Nov 7, 2024
6694e08
make sure ADTypes is usable in Defaults
jClugstor Nov 7, 2024
94ed7cb
make sure tests use ADTypes
jClugstor Nov 7, 2024
bc0ab6f
fix stats_test
jClugstor Nov 7, 2024
afc7062
fix sparsediff_tests
jClugstor Nov 7, 2024
a360016
fix DAE initialization
jClugstor Nov 7, 2024
fb734e6
add deprecated AD kwargs testset
jClugstor Nov 7, 2024
1dd781d
no call for diff_type
jClugstor Nov 7, 2024
3160e89
add _ADType_to_Bool utility function
jClugstor Nov 7, 2024
44397d7
make 0 nothing, no callable diff_type
jClugstor Nov 7, 2024
f809d43
check for types in bool to ADType
jClugstor Nov 7, 2024
77ac54a
fix the AD tests
jClugstor Nov 7, 2024
c09909b
test set name
jClugstor Nov 7, 2024
edb4bf0
fix ADType to bool conversion
jClugstor Nov 7, 2024
c957db9
use constructor for NLSolve autodiff
jClugstor Nov 8, 2024
a60dade
fix DAE initialization
jClugstor Nov 8, 2024
c388259
add ADTypes to test
jClugstor Nov 8, 2024
e6670d5
more using ADTypes
jClugstor Nov 8, 2024
7124802
update deps
jClugstor Nov 8, 2024
bcb7519
allow for Values in derivative wrapper for Algs not updated yet
jClugstor Nov 11, 2024
67c470d
change back to alg_autodiff gives constructed ADType, for compat
jClugstor Nov 11, 2024
62918b2
fix util
jClugstor Nov 11, 2024
a70c0d1
fix derivative wrappers
jClugstor Nov 11, 2024
2479e24
fix linsolves
jClugstor Nov 11, 2024
f69e6b9
fix prepare_alg
jClugstor Nov 11, 2024
0074bd1
get rid of bad definition of alg_autodiff
jClugstor Nov 11, 2024
dc6aaf2
small fixes
jClugstor Nov 11, 2024
9a6f8f3
other nameof
jClugstor Nov 11, 2024
5fd3c20
fixing constructorof
jClugstor Nov 11, 2024
1b420d6
another dang nameof
jClugstor Nov 11, 2024
03fc1fe
swap alg_autodiff around
jClugstor Nov 12, 2024
0a0ad84
fix compatibility with Val(::Bool) for other algs
jClugstor Nov 12, 2024
8fbb346
fix fallback for get_chunksize
jClugstor Nov 12, 2024
50f483a
change to chunksize 1 for fallback
jClugstor Nov 12, 2024
153f17c
change back to checking for Val(0)
jClugstor Nov 12, 2024
bc41895
no print
jClugstor Nov 12, 2024
03e8337
make sure AbstractADType is imported
jClugstor Nov 13, 2024
d6dec75
switch back CI
jClugstor Nov 13, 2024
866f6bd
Update CI.yml
ChrisRackauckas Nov 15, 2024
d96125a
Update Downstream.yml
ChrisRackauckas Nov 15, 2024
7257796
utils return ADTypes
jClugstor Nov 18, 2024
2051965
SDIRK ADType
jClugstor Nov 14, 2024
42211b4
PDIRK and BDF ADTypes
jClugstor Nov 14, 2024
33b34fd
FIRK ADTypes
jClugstor Nov 14, 2024
1d06dbc
Exrapolation ADTypes
jClugstor Nov 14, 2024
d7f16e3
exponentialRK ADTypes
jClugstor Nov 14, 2024
fb872c1
IMEXMultistep ADTypes
jClugstor Nov 14, 2024
5ee0f09
stabilizedIRK and Rosenbrock ADTypes
jClugstor Nov 14, 2024
da17cc3
missed Kvaerno3 ADTypes
jClugstor Nov 14, 2024
1b5bd33
fix the alg utils
jClugstor Nov 18, 2024
eef83f2
remove cruft
jClugstor Nov 18, 2024
1bde623
typoed
jClugstor Nov 18, 2024
a24771c
fix tag, update import
jClugstor Nov 19, 2024
c0c3955
get rid of the type weirdness, add a warning for using chunksize kwarg
jClugstor Dec 5, 2024
df50b90
change to instance of Val{fdtype}
jClugstor Dec 9, 2024
14bb3bc
use the given diff_type
jClugstor Dec 9, 2024
0c22789
update doc strings to reflect ADTypes
jClugstor Dec 9, 2024
0bd7013
Update lib/OrdinaryDiffEqBDF/Project.toml
ChrisRackauckas Dec 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCac
constvalue, calculate_residuals, calculate_residuals!,
trivial_limiter!, get_fsalfirstlast,
generic_solver_docstring,
full_cache
full_cache,
_bool_to_ADType
import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache
import RecursiveArrayTools: recursivefill!
using MuladdMacro, FastBroadcast
import Static: False
import ADTypes: AutoForwardDiff
import ADTypes: AutoForwardDiff, AbstractADType
import OrdinaryDiffEqCore

using Reexport
Expand Down
5 changes: 3 additions & 2 deletions lib/OrdinaryDiffEqBDF/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name = "OrdinaryDiffEqBDF"
uuid = "6ad6398a-0878-4a85-9266-38940aa047c8"
authors = ["ParamThakkar123 <paramthakkar864@gmail.com>"]
version = "1.1.2"
version = "1.2.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
Expand Down Expand Up @@ -31,7 +32,7 @@ LinearAlgebra = "<0.0.1, 1"
MacroTools = "0.5.13"
MuladdMacro = "0.2.4"
ODEProblemLibrary = "0.1.8"
OrdinaryDiffEqCore = "1.1"
OrdinaryDiffEqCore = "1.11"
OrdinaryDiffEqDifferentiation = "<0.0.1, 1"
OrdinaryDiffEqNonlinearSolve = "<0.0.1, 1"
OrdinaryDiffEqSDIRK = "<0.0.1, 1"
Expand Down
5 changes: 4 additions & 1 deletion lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!,
step_accept_controller!,
step_reject_controller!, post_newton_controller!,
u_modified!, DAEAlgorithm, _unwrap_val, DummyController,
get_fsalfirstlast, generic_solver_docstring
get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType,
_process_AD_choice
using OrdinaryDiffEqSDIRK: ImplicitEulerConstantCache, ImplicitEulerCache

using TruncatedStacktraces, MuladdMacro, MacroTools, FastBroadcast, RecursiveArrayTools
Expand All @@ -32,6 +33,8 @@ using OrdinaryDiffEqDifferentiation: UJacobianWrapper
using OrdinaryDiffEqNonlinearSolve: NLNewton, du_alias_or_new, build_nlsolver,
nlsolve!, nlsolvefail, isnewton, markfirststage!,
set_new_W!, DIRK, compute_step!, COEFFICIENT_MULTISTEP
import ADTypes
import ADTypes: AutoForwardDiff, AutoFiniteDiff, AbstractADType

using Reexport
@reexport using DiffEqBase
Expand Down
Loading
Loading