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

Use GPUArraysCore #213

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Use GPUArraysCore #213

merged 1 commit into from
Jun 22, 2022

Conversation

ChrisRackauckas
Copy link
Member

Before:

julia> @time_imports using RecursiveArrayTools
18.3 ms ┌ MacroTools
35.6 ms ┌ ZygoteRules
2.3 ms ┌ Compat
318.7 ms ┌ FillArrays
1320.3 ms ┌ StaticArrays
80.1 ms ┌ Preferences
86.5 ms ┌ JLLWrappers
373.9 ms ┌ LLVMExtra_jll
17.1 ms ┌ CEnum
485.5 ms ┌ LLVM
3.2 ms ┌ Adapt
2731.4 ms ┌ GPUArrays
11.8 ms ┌ DocStringExtensions
2.1 ms ┌ IfElse
72.5 ms ┌ RecipesBase
100.5 ms ┌ Static
6.0 ms ┌ ArrayInterfaceCore
164.4 ms ┌ ArrayInterface
13.0 ms ┌ ArrayInterfaceStaticArrays
208.8 ms ┌ ChainRulesCore
5503.5 ms RecursiveArrayTools

julia> @time_imports using RecursiveArrayTools
28.2 ms ┌ MacroTools
53.8 ms ┌ ZygoteRules
3.2 ms ┌ Compat
503.4 ms ┌ FillArrays
1715.4 ms ┌ StaticArrays
69.1 ms ┌ Preferences
103.9 ms ┌ JLLWrappers
500.3 ms ┌ LLVMExtra_jll
7.0 ms ┌ CEnum
265.1 ms ┌ LLVM
3.1 ms ┌ Adapt
2544.7 ms ┌ GPUArrays
16.1 ms ┌ DocStringExtensions
3.1 ms ┌ IfElse
265.8 ms ┌ RecipesBase
175.6 ms ┌ Static
8.1 ms ┌ ArrayInterfaceCore
222.9 ms ┌ ArrayInterface
3.6 ms ┌ ArrayInterfaceStaticArrays
175.3 ms ┌ ChainRulesCore
6228.5 ms RecursiveArrayTools

After:

julia> @time_imports using RecursiveArrayTools
30.9 ms ┌ MacroTools
54.5 ms ┌ ZygoteRules
2.3 ms ┌ Compat
299.2 ms ┌ FillArrays
1240.2 ms ┌ StaticArrays
7.3 ms ┌ DocStringExtensions
1.5 ms ┌ IfElse
43.5 ms ┌ RecipesBase
149.6 ms ┌ Static
5.2 ms ┌ ArrayInterfaceCore
195.5 ms ┌ ArrayInterface
3.3 ms ┌ Adapt
5.7 ms ┌ ArrayInterfaceStaticArrays
185.8 ms ┌ ChainRulesCore
10.2 ms ┌ GPUArraysCore
2169.1 ms RecursiveArrayTools

julia> @time_imports using RecursiveArrayTools
23.3 ms ┌ MacroTools
44.2 ms ┌ ZygoteRules
2.4 ms ┌ Compat
305.4 ms ┌ FillArrays
1015.0 ms ┌ StaticArrays
12.3 ms ┌ DocStringExtensions
2.0 ms ┌ IfElse
108.6 ms ┌ RecipesBase
134.0 ms ┌ Static
5.8 ms ┌ ArrayInterfaceCore
190.5 ms ┌ ArrayInterface
3.4 ms ┌ Adapt
5.2 ms ┌ ArrayInterfaceStaticArrays
273.1 ms ┌ ChainRulesCore
13.3 ms ┌ GPUArraysCore
2111.9 ms RecursiveArrayTools

Before:

julia> @time_imports using RecursiveArrayTools
     18.3 ms    ┌ MacroTools
     35.6 ms  ┌ ZygoteRules
      2.3 ms  ┌ Compat
    318.7 ms  ┌ FillArrays
   1320.3 ms  ┌ StaticArrays
     80.1 ms      ┌ Preferences
     86.5 ms    ┌ JLLWrappers
    373.9 ms  ┌ LLVMExtra_jll
     17.1 ms      ┌ CEnum
    485.5 ms    ┌ LLVM
      3.2 ms    ┌ Adapt
   2731.4 ms  ┌ GPUArrays
     11.8 ms  ┌ DocStringExtensions
      2.1 ms  ┌ IfElse
     72.5 ms  ┌ RecipesBase
    100.5 ms    ┌ Static
      6.0 ms    ┌ ArrayInterfaceCore
    164.4 ms  ┌ ArrayInterface
     13.0 ms  ┌ ArrayInterfaceStaticArrays
    208.8 ms  ┌ ChainRulesCore
   5503.5 ms  RecursiveArrayTools

julia> @time_imports using RecursiveArrayTools
   28.2 ms    ┌ MacroTools
   53.8 ms  ┌ ZygoteRules
    3.2 ms  ┌ Compat
  503.4 ms  ┌ FillArrays
 1715.4 ms  ┌ StaticArrays
   69.1 ms      ┌ Preferences
  103.9 ms    ┌ JLLWrappers
  500.3 ms  ┌ LLVMExtra_jll
    7.0 ms      ┌ CEnum
  265.1 ms    ┌ LLVM
    3.1 ms    ┌ Adapt
 2544.7 ms  ┌ GPUArrays
   16.1 ms  ┌ DocStringExtensions
    3.1 ms  ┌ IfElse
  265.8 ms  ┌ RecipesBase
  175.6 ms    ┌ Static
    8.1 ms    ┌ ArrayInterfaceCore
  222.9 ms  ┌ ArrayInterface
    3.6 ms  ┌ ArrayInterfaceStaticArrays
  175.3 ms  ┌ ChainRulesCore
 6228.5 ms  RecursiveArrayTools

 After:

 julia> @time_imports using RecursiveArrayTools
     30.9 ms    ┌ MacroTools
     54.5 ms  ┌ ZygoteRules
      2.3 ms  ┌ Compat
    299.2 ms  ┌ FillArrays
   1240.2 ms  ┌ StaticArrays
      7.3 ms  ┌ DocStringExtensions
      1.5 ms  ┌ IfElse
     43.5 ms  ┌ RecipesBase
    149.6 ms    ┌ Static
      5.2 ms    ┌ ArrayInterfaceCore
    195.5 ms  ┌ ArrayInterface
      3.3 ms  ┌ Adapt
      5.7 ms  ┌ ArrayInterfaceStaticArrays
    185.8 ms  ┌ ChainRulesCore
     10.2 ms  ┌ GPUArraysCore
   2169.1 ms  RecursiveArrayTools

julia> @time_imports using RecursiveArrayTools
   23.3 ms    ┌ MacroTools
   44.2 ms  ┌ ZygoteRules
    2.4 ms  ┌ Compat
  305.4 ms  ┌ FillArrays
 1015.0 ms  ┌ StaticArrays
   12.3 ms  ┌ DocStringExtensions
    2.0 ms  ┌ IfElse
  108.6 ms  ┌ RecipesBase
  134.0 ms    ┌ Static
    5.8 ms    ┌ ArrayInterfaceCore
  190.5 ms  ┌ ArrayInterface
    3.4 ms  ┌ Adapt
    5.2 ms  ┌ ArrayInterfaceStaticArrays
  273.1 ms  ┌ ChainRulesCore
   13.3 ms  ┌ GPUArraysCore
 2111.9 ms  RecursiveArrayTools
ChrisRackauckas added a commit to JuliaArrays/ArrayInterface.jl that referenced this pull request Jun 22, 2022
@ChrisRackauckas ChrisRackauckas merged commit 1672efd into master Jun 22, 2022
@ChrisRackauckas ChrisRackauckas deleted the gpuarrayscore branch June 22, 2022 09:35
ChrisRackauckas added a commit that referenced this pull request Jun 25, 2022
Requires JuliaArrays/ArrayInterface.jl#325

```julia
@time_imports using SciMLBase
    10.4 ms    ┌ MacroTools
     19.0 ms  ┌ ZygoteRules
      3.8 ms  ┌ Compat
      1.5 ms    ┌ Adapt
      3.7 ms    ┌ ArrayInterfaceCore
      2.0 ms    ┌ StaticArraysCore
      9.7 ms  ┌ ArrayInterfaceStaticArraysCore
    123.1 ms  ┌ FillArrays
      5.0 ms  ┌ DocStringExtensions
     18.2 ms  ┌ RecipesBase
     51.3 ms  ┌ ChainRulesCore
      4.0 ms  ┌ GPUArraysCore
    292.7 ms  RecursiveArrayTools
```

Compare that to #213
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.

1 participant