Skip to content

Commit

Permalink
Remove recompile_invalidations
Browse files Browse the repository at this point in the history
`@recompile_invalidations` should only be used in very specific scenarios, and this is not one of those scenarios. Also, there are big changes being done with https://github.com/SciML/CommonWorldInvalidations.jl. With that, we only need to `@recompile_invalidations` on a few entry points. In particular, Static.jl, Symbolics.jl, and preferably ForwardDiff.jl and StaticArrays.jl would adopt it too. But this means that in order to handle all of this effectively, in SciML we only need to apply it on Static.jl, Symbolics.jl, and SciMLBase.jl and the whole ecosystem should be fine.

In any case, this library doesn't need it. It shouldn't make a tangible difference in compile times, while it increases precompile times by a lot.
  • Loading branch information
ChrisRackauckas authored Jun 27, 2024
1 parent 2691d59 commit c7299ec
Showing 1 changed file with 25 additions and 29 deletions.
54 changes: 25 additions & 29 deletions src/DiffEqFlux.jl
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
module DiffEqFlux

using PrecompileTools: @recompile_invalidations

@recompile_invalidations begin
using ADTypes: ADTypes, AutoForwardDiff, AutoZygote
using ChainRulesCore: ChainRulesCore
using ConcreteStructs: @concrete
using Distributions: Distributions, ContinuousMultivariateDistribution, Distribution,
logpdf
using DistributionsAD: DistributionsAD
using ForwardDiff: ForwardDiff
using Functors: Functors, fmap
using LinearAlgebra: LinearAlgebra, Diagonal, det, tr, mul!
using Lux: Lux, Chain, Dense, StatefulLuxLayer, FromFluxAdaptor,
using LuxCore: LuxCore, AbstractExplicitLayer, AbstractExplicitContainerLayer
using Random: Random, AbstractRNG, randn!
using Reexport: @reexport
using SciMLBase: SciMLBase, DAEProblem, DDEFunction, DDEProblem, EnsembleProblem,
ODEFunction, ODEProblem, ODESolution, SDEFunction, SDEProblem, remake,
solve
using SciMLSensitivity: SciMLSensitivity, AdjointLSS, BacksolveAdjoint, EnzymeVJP,
ForwardDiffOverAdjoint, ForwardDiffSensitivity, ForwardLSS,
ForwardSensitivity, GaussAdjoint, InterpolatingAdjoint, NILSAS,
NILSS, QuadratureAdjoint, ReverseDiffAdjoint, ReverseDiffVJP,
SteadyStateAdjoint, TrackerAdjoint, TrackerVJP, ZygoteAdjoint,
ZygoteVJP
using Setfield: @set
using Tracker: Tracker
using Zygote: Zygote
end
using ADTypes: ADTypes, AutoForwardDiff, AutoZygote
using ChainRulesCore: ChainRulesCore
using ConcreteStructs: @concrete
using Distributions: Distributions, ContinuousMultivariateDistribution, Distribution,
logpdf
using DistributionsAD: DistributionsAD
using ForwardDiff: ForwardDiff
using Functors: Functors, fmap
using LinearAlgebra: LinearAlgebra, Diagonal, det, tr, mul!
using Lux: Lux, Chain, Dense, StatefulLuxLayer, FromFluxAdaptor,
using LuxCore: LuxCore, AbstractExplicitLayer, AbstractExplicitContainerLayer
using Random: Random, AbstractRNG, randn!
using Reexport: @reexport
using SciMLBase: SciMLBase, DAEProblem, DDEFunction, DDEProblem, EnsembleProblem,
ODEFunction, ODEProblem, ODESolution, SDEFunction, SDEProblem, remake,
solve
using SciMLSensitivity: SciMLSensitivity, AdjointLSS, BacksolveAdjoint, EnzymeVJP,
ForwardDiffOverAdjoint, ForwardDiffSensitivity, ForwardLSS,
ForwardSensitivity, GaussAdjoint, InterpolatingAdjoint, NILSAS,
NILSS, QuadratureAdjoint, ReverseDiffAdjoint, ReverseDiffVJP,
SteadyStateAdjoint, TrackerAdjoint, TrackerVJP, ZygoteAdjoint,
ZygoteVJP
using Setfield: @set
using Tracker: Tracker
using Zygote: Zygote

const CRC = ChainRulesCore

Expand Down

0 comments on commit c7299ec

Please sign in to comment.