Skip to content

Commit

Permalink
Test Polyester Forward Diff
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jan 17, 2024
1 parent 3decd57 commit e4d40fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
29 changes: 19 additions & 10 deletions benchmarks/NonlinearProblem/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "abd8afdd0f77a58e093f38d7c5b17d9e2ea3f7a2"
project_hash = "3328a7b1379a326584ceba59408abb775acfe0ed"

[[deps.ADTypes]]
git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245"
Expand Down Expand Up @@ -1417,11 +1417,11 @@ version = "0.1.2"

[[deps.NonlinearSolve]]
deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "TimerOutputs"]
git-tree-sha1 = "00e58e1a3c9d457dda1f93b611174914c0cf8932"
repo-rev = "ap/rework_internals"
git-tree-sha1 = "cf1e4d2ed344369e2392a1e32876a9147d0b081c"
repo-rev = "ap/polyester-forward-diff"
repo-url = "https://github.com/avik-pal/NonlinearSolve.jl"
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
version = "3.5.0"
version = "3.6.0"

[deps.NonlinearSolve.extensions]
NonlinearSolveBandedMatricesExt = "BandedMatrices"
Expand All @@ -1430,6 +1430,7 @@ version = "3.5.0"
NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim"
NonlinearSolveMINPACKExt = "MINPACK"
NonlinearSolveNLsolveExt = "NLsolve"
NonlinearSolvePolyesterForwardDiffExt = "PolyesterForwardDiff"
NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations"
NonlinearSolveSpeedMappingExt = "SpeedMapping"
NonlinearSolveSymbolicsExt = "Symbolics"
Expand All @@ -1442,6 +1443,7 @@ version = "3.5.0"
LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891"
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4"
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
Expand Down Expand Up @@ -1655,6 +1657,12 @@ git-tree-sha1 = "fca25670784a1ae44546bcb17288218310af2778"
uuid = "f517fe37-dbe3-4b94-8317-1923a5111588"
version = "0.7.9"

[[deps.PolyesterForwardDiff]]
deps = ["ForwardDiff", "Polyester"]
git-tree-sha1 = "e83434d4518732157710cc4517593c3a93caf196"
uuid = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
version = "0.1.1"

[[deps.PolyesterWeave]]
deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"]
git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6"
Expand Down Expand Up @@ -2008,15 +2016,12 @@ deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastClosu
git-tree-sha1 = "470c5f97af31fa35926b45eb01e53a46c8d7d35f"
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
version = "1.3.1"
weakdeps = ["PolyesterForwardDiff", "StaticArrays"]

[deps.SimpleNonlinearSolve.extensions]
SimpleNonlinearSolvePolyesterForwardDiffExt = "PolyesterForwardDiff"
SimpleNonlinearSolveStaticArraysExt = "StaticArrays"

[deps.SimpleNonlinearSolve.weakdeps]
PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[[deps.SimplePartitions]]
deps = ["AbstractLattices", "DataStructures", "Permutations"]
git-tree-sha1 = "e9330391d04241eafdc358713b48396619c83bcb"
Expand Down Expand Up @@ -2069,17 +2074,21 @@ version = "1.10.0"

[[deps.SparseDiffTools]]
deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"]
git-tree-sha1 = "c281e11db4eacb36a292a054bac83c5a0aca2a26"
git-tree-sha1 = "d88d1b1699c20a081e6c6c88f092294cf9cf6318"
repo-rev = "ap/polyester-forward-diff"
repo-url = "https://github.com/avik-pal/SparseDiffTools.jl"
uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
version = "2.15.0"
version = "2.16.0"

[deps.SparseDiffTools.extensions]
SparseDiffToolsEnzymeExt = "Enzyme"
SparseDiffToolsPolyesterForwardDiffExt = "PolyesterForwardDiff"
SparseDiffToolsSymbolicsExt = "Symbolics"
SparseDiffToolsZygoteExt = "Zygote"

[deps.SparseDiffTools.weakdeps]
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/NonlinearProblem/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344"
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/NonlinearProblem/nonlinear_battery_problem.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Fetch required packages.

```julia
using NonlinearSolve, MINPACK, NLsolve, LinearSolve, StaticArrays, Sundials,
BenchmarkTools, LinearAlgebra, DiffEqDevTools, CairoMakie
BenchmarkTools, LinearAlgebra, DiffEqDevTools, CairoMakie, PolyesterForwardDiff
RUS = RadiusUpdateSchemes;
```

Declare the benchmarked solvers (and their names and plotting options).

```julia
DEFAULT_AD = AutoForwardDiff(; chunksize = 12)
DEFAULT_AD = AutoPolyesterForwardDiff(; chunksize = 12)

solvers_all = [
(; name = "Newton Raphson (No Line Search)", solver = Dict(:alg => NewtonRaphson(; autodiff = DEFAULT_AD))),
Expand Down

0 comments on commit e4d40fd

Please sign in to comment.