Closed charleskawczynski closed 1 year ago
Interesting. Is this on the latest version? We cut a few things out recently that chop the startup time considerably, and this looks like the numbers I saw before doing that.
[[deps.ExponentialUtilities]]
deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"]
git-tree-sha1 = "fb7dbef7d2631e2d02c49e2750f7447648b0ec9b"
uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18"
version = "1.24.0"
with
julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.5.0)
CPU: 8 × Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
Threads: 1 on 4 virtual cores
@ChrisRackauckas what was done to reduce precompilation time before? Maybe this is somehow an issue on our side?
It was just overspecializing. https://github.com/SciML/ExponentialUtilities.jl/pull/119
Wow, thanks for digging into this!
@ChrisRackauckas, this seems to have cropped back up somehow?
julia> @time_imports using ClimaAtmos
[ Info: Precompiling ClimaAtmos [b2c96348-7fb7-4fe0-8da9-78d88439e717]
...
10.1 ms Ratios
10.2 ms ArnoldiMethod
10.2 ms LayoutPointers
10.6 ms CloudMicrophysics
10.7 ms LeftChildRightSiblingTrees
10.9 ms Thermodynamics
11.0 ms CommonDataModel
11.0 ms DiffEqBase
11.1 ms LineSearches
11.3 ms SpecialFunctions
11.5 ms Zstd_jll
11.7 ms ThreadingUtilities
11.8 ms RandomNumbers
11.8 ms SparseDiffTools
12.3 ms Sparspak
12.4 ms CFTime
12.4 ms Missings
12.7 ms RecipesBase
12.8 ms RRTMGP
13.5 ms TiledIteration
13.9 ms LinearOperators
14.7 ms OrderedCollections
14.9 ms NLSolversBase
15.0 ms AbstractFFTs 65.97% compilation time (100% recompilation)
15.4 ms ComputationalResources
16.4 ms Preferences
16.4 ms SciMLOperators
16.5 ms ArrayInterfaceCore
16.7 ms KernelAbstractions
17.0 ms Lazy
17.4 ms CatIndices
17.5 ms PolyesterWeave
19.5 ms HostCPUFeatures
20.5 ms CompilerSupportLibraries_jll 26.04% compilation time
20.5 ms MappedArrays
22.2 ms TimerOutputs
22.6 ms SurfaceFluxes
23.2 ms NVTX
24.1 ms FFTViews
24.9 ms KLU
25.2 ms DualNumbers
25.2 ms GenericSchur
25.3 ms Setfield
25.6 ms Tables
26.1 ms StatsBase
29.4 ms IntervalSets
31.0 ms FunctionWrappers
31.4 ms PDMats
31.7 ms Distances
32.6 ms RecursiveArrayTools
33.9 ms PkgVersion
36.7 ms ImageBase
37.8 ms MPI
43.6 ms OffsetArrays
45.0 ms Interpolations
45.6 ms ClimaTimeSteppers
46.7 ms Krylov
49.4 ms AbstractTrees
49.6 ms Statistics
50.2 ms Graphs
50.9 ms TaylorSeries
51.3 ms NetCDF_jll
51.8 ms Static
57.7 ms ForwardDiff
58.0 ms LLVM
58.3 ms ChainRulesCore
73.9 ms SuiteSparse_jll
81.9 ms GPUArrays
93.9 ms DataStructures
101.0 ms FFTW
131.9 ms FillArrays
146.4 ms ClimaCore
171.5 ms BlockArrays
185.1 ms ColorTypes
206.8 ms VectorizationBase
211.5 ms FileIO
216.4 ms Dierckx_jll 98.69% compilation time (100% recompilation)
218.9 ms LoopVectorization
225.0 ms ColorVectorSpace 5.06% compilation time (100% recompilation)
226.3 ms JLD2 4.90% compilation time
228.9 ms RecursiveFactorization
231.3 ms GPUCompiler 2.99% compilation time
252.9 ms StrideArraysCore
298.7 ms SimpleNonlinearSolve
299.0 ms SciMLBase 5.38% compilation time (100% recompilation)
342.9 ms LinearSolve
378.0 ms Colors
410.0 ms BandedMatrices
443.5 ms Distributions
445.8 ms ImageFiltering
458.1 ms NCDatasets
553.7 ms ImageCore 1.61% compilation time (100% recompilation)
556.8 ms ClimaAtmos
558.7 ms NonlinearSolve
736.6 ms CUDA
778.9 ms FixedPointNumbers
785.1 ms OrdinaryDiffEq
836.3 ms StaticArrays
1093.0 ms HDF5 90.87% compilation time (95% recompilation)
1116.0 ms ArrayLayouts
1588.4 ms ExponentialUtilities
I see it's not as bad as before, but it still seems pretty long
Are you invalidating?
julia> @time_imports using ExponentialUtilities
0.2 ms SuiteSparse
0.3 ms Requires
1.8 ms ArrayInterface
29.4 ms Preferences
0.3 ms SnoopPrecompile
15.1 ms GenericSchur
0.4 ms Adapt
1.5 ms GPUArraysCore
0.2 ms ArrayInterface → ArrayInterfaceGPUArraysCoreExt
241.9 ms ExponentialUtilities
Ah, yeah, we're still seeing a lot of invalidations in julia 1.9, but they look much better (and ExponentialUtilities compile times look much better, too) in 1.10 beta. So we'll just wait for the update for the fix, thanks!
We're seeing very long compile times for ExponentialUtilities over at ClimaAtmos.jl:
Title credit to @trontrytel
To reproduce: