Skip to content

Getting rid of ReverseDiff from the dependency graph of OrdinaryDiffEq #39

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

Closed
baggepinnen opened this issue Sep 10, 2022 · 4 comments
Closed

Comments

@baggepinnen
Copy link

baggepinnen commented Sep 10, 2022

Does ReverseDiff.jl have to be a dependency of this package? Alternatively, does this package have to be in the dependency graph of OrdinaryDiffEq? This is causing RD.jl to be loaded when DiffEq is loaded, and RD.jl contributes a full 3 seconds to the load time of OrdinaryDiffEq.jl, just for this package to provide the method Base.getindex(b::LazyBufferCache, u::ReverseDiff.TrackedArray)

julia> @time_imports using OrdinaryDiffEq
      3.1 ms  DocStringExtensions 67.85% compilation time
      0.1 ms  Reexport
      0.2 ms  Requires
      0.0 ms  SuiteSparse
      2.1 ms  ArrayInterfaceCore
      0.5 ms  Statistics
      1.5 ms  StaticArraysCore
    371.5 ms  StaticArrays
      8.6 ms  FunctionWrappers
      0.2 ms  MuladdMacro
      4.5 ms  OrderedCollections
      0.1 ms  UnPack
      0.2 ms  Parameters
     11.8 ms  FiniteDiff 60.53% compilation time (18% recompilation)
      4.4 ms  IrrationalConstants
      0.5 ms  DiffRules
      1.4 ms  DiffResults
     20.2 ms  Preferences
      0.1 ms  OpenLibm_jll
      0.2 ms  NaNMath
      0.4 ms  DelimitedFiles
      0.2 ms  Compat
     45.6 ms  ChainRulesCore
      0.4 ms  ChangesOfVariables
      0.4 ms  InverseFunctions
      0.5 ms  LogExpFunctions
      0.2 ms  JLLWrappers
      3.1 ms  OpenSpecFun_jll 70.08% compilation time
     12.2 ms  SpecialFunctions
      8.3 ms  MacroTools
      0.2 ms  CommonSubexpressions
     62.0 ms  ForwardDiff
      0.7 ms  ConstructionBase
     57.3 ms  Setfield 80.68% compilation time
     19.5 ms  RecipesBase
      0.1 ms  ZygoteRules
      0.2 ms  Adapt
      0.2 ms  ArrayInterfaceStaticArraysCore
    117.0 ms  FillArrays
      0.1 ms  DataValueInterfaces
      0.5 ms  DataAPI
      0.1 ms  IteratorInterfaceExtensions
      0.0 ms  TableTraits
      9.6 ms  Tables
      2.4 ms  GPUArraysCore
     20.8 ms  RecursiveArrayTools
     10.4 ms  IterativeSolvers
      0.0 ms  IfElse
     13.9 ms  Static
      9.6 ms  ArrayInterface
     37.1 ms  OffsetArrays
      0.4 ms  ArrayInterfaceOffsetArrays
      0.7 ms  ArrayInterfaceStaticArrays
      0.1 ms  SIMDTypes
      0.8 ms  ManualMemory
      2.7 ms  LayoutPointers
      0.7 ms  CpuId
    144.2 ms  CPUSummary 91.24% compilation time
      0.1 ms  BitTwiddlingConvenienceFunctions
     64.7 ms  HostCPUFeatures 75.37% compilation time
    324.7 ms  VectorizationBase
      2.6 ms  SLEEFPirates
     44.4 ms  ThreadingUtilities 79.12% compilation time
     13.4 ms  PolyesterWeave 72.62% compilation time
      2.5 ms  CloseOpenIntervals
      0.1 ms  SnoopPrecompile
      2.1 ms  SIMDDualNumbers
    175.1 ms  LoopVectorization
    141.3 ms  StrideArraysCore 2.60% compilation time
      0.7 ms  Polyester
    134.2 ms  TriangularSolve 5.41% compilation time
    179.8 ms  RecursiveFactorization
      0.1 ms  CommonSolve
      0.5 ms  FunctionWrappersWrappers
    110.5 ms  SciMLBase
      4.2 ms  NonlinearSolve
      0.3 ms  FastBroadcast
     59.3 ms  DataStructures
      0.3 ms  SortingAlgorithms
      6.3 ms  Missings
      0.2 ms  StatsAPI
     23.7 ms  StatsBase
     16.0 ms  PDMats
      1.1 ms  Rmath_jll
     59.5 ms  Rmath 90.40% compilation time
      1.9 ms  Calculus
     11.5 ms  DualNumbers
      0.6 ms  HypergeometricFunctions
      5.2 ms  StatsFuns
      1.7 ms  QuadGK
      0.9 ms  DensityInterface
    174.8 ms  Distributions
      0.2 ms  Tricks
     22.6 ms  DiffEqBase 54.41% compilation time
      0.1 ms  FastClosures
     12.3 ms  KLU
      7.6 ms  FastLapackInterface
      5.1 ms  Krylov
     61.7 ms  KrylovKit 15.50% compilation time
     25.1 ms  LinearSolve 16.88% compilation time
   2974.4 ms  ReverseDiff
      0.6 ms  PreallocationTools
     21.3 ms  GenericSchur
      2.5 ms  ExponentialUtilities
      4.0 ms  Distances
      4.2 ms  NLSolversBase
      3.7 ms  LineSearches
      1.9 ms  NLsolve
      2.6 ms  SimpleTraits
      3.7 ms  ArnoldiMethod
      0.4 ms  Inflate
     33.9 ms  Graphs
      0.2 ms  VertexSafeGraphs
     19.4 ms  SparseDiffTools 30.17% compilation time
      0.1 ms  ArrayInterfaceGPUArrays
   1632.2 ms  OrdinaryDiffEq

This was measured on Julia Version 1.9.0-DEV.1307 (2022-09-07) Commit 83658d265d8 (3 days old master)

@ChrisRackauckas
Copy link
Member

It's needed for a correctness issue #30 caused by an interface break with ReverseDiff.jl. It would be nice to fix that interface break if possible.

@ChrisRackauckas
Copy link
Member

Maybe it could be moved to SciMLSensitivity

@ChrisRackauckas
Copy link
Member

@frankschae

@ChrisRackauckas
Copy link
Member

Done: #40

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

No branches or pull requests

2 participants