Skip to content
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

Reduce time for enzyme import #1645

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Reduce time for enzyme import #1645

merged 6 commits into from
Jul 15, 2024

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Jul 15, 2024

Before this change:

julia> @time_imports using Enzyme
┌ Warning: The project dependencies or compat requirements have changed since the manifest was last resolved.
│ It is recommended to `Pkg.resolve()` or consider `Pkg.update()` if necessary.
└ @ Pkg.API /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Pkg/src/API.jl:1807
Precompiling Enzyme
        Info Given Enzyme was explicitly requested, output will be shown live 
WARNING: method definition for PrimalErrorThunk at /Users/wmoses/git/Enzyme.jl/src/compiler.jl:6105 declares type variable World but does not use it.
  2 dependencies successfully precompiled in 112 seconds. 16 already precompiled.
  1 dependency had output during precompilation:
┌ Enzyme
│  [Output was shown above]
└  
      1.3 ms  EnzymeCore
      1.1 ms  CEnum
      6.8 ms  Preferences
      0.3 ms  LazyArtifacts
      0.5 ms  JLLWrappers
               ┌ 3.3 ms LLVMExtra_jll.__init__() 69.32% compilation time
     16.4 ms  LLVMExtra_jll 88.20% compilation time
               ┌ 0.1 ms LLVM.__init__() 
     20.0 ms  LLVM
               ┌ 1.0 ms Enzyme_jll.__init__() 
      2.0 ms  Enzyme_jll
      0.4 ms  ExprTools
               ┌ 0.0 ms TimerOutputs.__init__() 
     10.8 ms  TimerOutputs
      0.4 ms  Scratch
               ┌ 0.4 ms GPUCompiler.__init__() 
     66.1 ms  GPUCompiler 0.14% compilation time
      0.5 ms  Reexport
      0.4 ms  StructIO
               ┌ 0.0 ms ObjectFile.__init__() 
      5.6 ms  ObjectFile
               ┌ 6.4 ms Enzyme.API.__init__() 
               ├ 0.2 ms Enzyme.Compiler.JIT.__init__() 
               ├ 0.0 ms Enzyme.Compiler.FFI.BLASSupport.__init__() 
               ├ 1.9 ms Enzyme.Compiler.FFI.__init__() 
               ├ 0.3 ms Enzyme.Compiler.__init__() 
   1429.7 ms  Enzyme 0.00% compilation time

After this change:

julia> @time_imports using Enzyme
      1.4 ms  EnzymeCore
      1.3 ms  CEnum
      7.9 ms  Preferences
      0.4 ms  LazyArtifacts
      0.4 ms  JLLWrappers
               ┌ 3.3 ms LLVMExtra_jll.__init__() 63.70% compilation time
     17.1 ms  LLVMExtra_jll 87.53% compilation time
               ┌ 0.2 ms LLVM.__init__() 
     19.8 ms  LLVM
               ┌ 1.2 ms Enzyme_jll.__init__() 
      1.9 ms  Enzyme_jll
      0.4 ms  ExprTools
               ┌ 0.0 ms TimerOutputs.__init__() 
     11.2 ms  TimerOutputs
      0.4 ms  Scratch
               ┌ 0.4 ms GPUCompiler.__init__() 
     71.0 ms  GPUCompiler 0.06% compilation time
      0.4 ms  Reexport
      0.4 ms  StructIO
               ┌ 0.0 ms ObjectFile.__init__() 
      5.4 ms  ObjectFile
               ┌ 1.4 ms Enzyme.API.__init__() 
               ├ 0.1 ms Enzyme.Compiler.JIT.__init__() 
               ├ 0.0 ms Enzyme.Compiler.FFI.BLASSupport.__init__() 
               ├ 1.9 ms Enzyme.Compiler.FFI.__init__() 
               ├ 0.0 ms Enzyme.Compiler.__init__() 
     75.3 ms  Enzyme 0.10% compilation time

Copy link
Contributor

github-actions bot commented Jul 15, 2024

Benchmark Results

main 3c4c2d1... main/3c4c2d1d85cdb9...
basics/overhead 4.34 ± 0.01 ns 4.34 ± 0.01 ns 1
time_to_load 0.421 ± 0.00089 s 0.455 ± 0.0059 s 0.925

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@wsmoses wsmoses merged commit 0382d59 into main Jul 15, 2024
32 of 55 checks passed
@wsmoses wsmoses deleted the eimp branch July 15, 2024 14:53
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

Successfully merging this pull request may close these issues.

None yet

1 participant