Description
julia> @time_imports using GPUArrays
16.5 ms ┌ Preferences
25.2 ms ┌ JLLWrappers
173.7 ms ┌ LLVMExtra_jll
4.3 ms ┌ CEnum
97.1 ms ┌ LLVM
2.0 ms ┌ Adapt
1000.1 ms GPUArrays
Could there be a version that just defines the simplest stuff? GPUArrays.jl is too big to be a dependency everywhere, which makes Requires.jl usage a thing. We only need a few things in many places to get what's necessary:
https://github.com/JuliaArrays/ArrayInterface.jl/blob/master/lib/ArrayInterfaceGPUArrays/src/ArrayInterfaceGPUArrays.jl
https://github.com/SciML/RecursiveArrayTools.jl/blob/master/src/RecursiveArrayTools.jl#L27-L29
https://github.com/SciML/LinearSolve.jl/blob/8e31fd75dd10f478fca74fd46477f7b342590ab9/src/default.jl#L12
https://github.com/SciML/ExponentialUtilities.jl/blob/47f47b6f4ec95c3e88f94f2f41dd5f119f788f64/src/krylov_phiv.jl#L130
https://github.com/SciML/DiffEqNoiseProcess.jl/blob/03005350b6284fd8aaa8ca5374d990ea46bb3c80/src/wiener.jl#L19
https://github.com/SciML/DiffEqSensitivity.jl/blob/50fff85abca5452a90b155f8eb9833498d5b7aa4/src/concrete_solve.jl#L45
It would only need:
- Top level things like
GPUArrays.AbstractGPUArray
GPUArrays.@allowscalar
And the entirety of SciML would then cut out the LLVM dependency and 1 second off every package. Some packages only have a 1 second using time, so it's almost entirely GPUArrays that's the issue now, and just for those two things.