Skip to content

Commit d6b5536

Browse files
committed
refactor: remove Zygote extension
1 parent fa575c6 commit d6b5536

File tree

6 files changed

+2
-21
lines changed

6 files changed

+2
-21
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba"
4545
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
4646
SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4"
4747
SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412"
48-
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4948

5049
[extensions]
5150
NonlinearSolveBandedMatricesExt = "BandedMatrices"
@@ -57,7 +56,6 @@ NonlinearSolveNLSolversExt = "NLSolvers"
5756
NonlinearSolveNLsolveExt = "NLsolve"
5857
NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations"
5958
NonlinearSolveSpeedMappingExt = "SpeedMapping"
60-
NonlinearSolveZygoteExt = "Zygote"
6159

6260
[compat]
6361
ADTypes = "1.9"

ext/NonlinearSolveZygoteExt.jl

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/NonlinearSolve.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ using SparseMatrixColorings: ConstantColoringAlgorithm, GreedyColoringAlgorithm,
6161

6262
const DI = DifferentiationInterface
6363

64-
# Type-Inference Friendly Check for Extension Loading
65-
is_extension_loaded(::Val) = false
66-
6764
const True = Val(true)
6865
const False = Val(false)
6966

src/internal/helpers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function get_concrete_reverse_ad(
8080
else
8181
use_sparse_ad = false
8282
end
83-
ad = if isinplace(prob) || !is_extension_loaded(Val(:Zygote)) # Use Finite Differencing
83+
ad = if isinplace(prob) || !DI.check_available(AutoZygote()) # Use Finite Differencing
8484
use_sparse_ad ? AutoSparse(AutoFiniteDiff()) : AutoFiniteDiff()
8585
else
8686
use_sparse_ad ? AutoSparse(AutoZygote()) : AutoZygote()

test/misc/bruss_tests.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@
5252
sol = solve(prob_brusselator_2d_sparse, NewtonRaphson(); abstol = 1e-8)
5353
@test norm(sol.resid, Inf) < 1e-8
5454

55-
prob_brusselator_2d_sparse = NonlinearProblem(
56-
NonlinearFunction(brusselator_2d_loop; sparsity = SymbolicsSparsityDetector()),
57-
u0, p)
58-
sol = solve(prob_brusselator_2d_sparse, NewtonRaphson(); abstol = 1e-8)
59-
@test norm(sol.resid, Inf) < 1e-8
60-
6155
# Deprecated
6256
sol = solve(prob_brusselator_2d,
6357
NewtonRaphson(autodiff = AutoSparse(AutoFiniteDiff())); abstol = 1e-8)

test/misc/qa_tests.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ end
1717
@testitem "Explicit Imports" tags=[:misc] begin
1818
using NonlinearSolve, ADTypes, SimpleNonlinearSolve, SciMLBase
1919
import BandedMatrices, FastLevenbergMarquardt, FixedPointAcceleration,
20-
LeastSquaresOptim, MINPACK, NLsolve, NLSolvers, SIAMFANLEquations, SpeedMapping,
21-
Zygote
20+
LeastSquaresOptim, MINPACK, NLsolve, NLSolvers, SIAMFANLEquations, SpeedMapping
2221

2322
using ExplicitImports
2423

0 commit comments

Comments
 (0)