Repository navigation
Conversation
CUDACore's workload doesn't use the GPU, so the first reduction, scan or predicate of a session compiles AcceleratedKernels' host code and kernels. CUDACore couldn't cache them for the tunings set here anyway, as this extension isn't loaded while CUDACore precompiles. Run them in a workload of this extension when CUDA is functional while precompiling, on arrays just large enough to select the kernels that a vector of 10^6 elements and a 1000×1000 matrix do. Like CUDACore's own workload, it needs Julia 1.12. On an RTX 5080 with Julia 1.13, and CUDA.jl's KernelAbstractions methods moved into CUDACore (JuliaGPU/CUDA.jl#3493), the first `sum` of 10^6 elements takes 6 ms instead of 1.1 s, `cumsum` 0.18 s instead of 1.6 s, `any` and `all` 55 ms instead of 1.2 s, and `sum` along either dimension of a 1000×1000 matrix 0.52 s instead of 1.6 s. Without that change, loading CUDACore's KernelAbstractions extension invalidates part of this code, and these take 0.6 to 1 s. The extension's image grows from 0.03 to 11 MB, and its precompilation from 1.6 to 5 s.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CUDACore's precompilation workload doesn't use the GPU, so the first reduction, scan or predicate of a session compiles AcceleratedKernels' host code and kernels. CUDACore couldn't cache them for the tunings this extension sets anyway, since the extension isn't loaded while CUDACore precompiles.
This runs them in a workload of the extension when CUDA is functional while precompiling, on arrays just large enough to select the kernels that a vector of 10^6 elements and a 1000×1000 matrix do (checked by recording the kernels compiled at both sizes). Like CUDACore's own workload it needs Julia 1.12; without a GPU it is skipped, and a failure while running it fails precompilation rather than being hidden.
On an RTX 5080 with Julia 1.13, together with JuliaGPU/CUDA.jl#3493, the first
sumof 10^6 elements takes 6 ms instead of 1.1 s,cumsum0.18 instead of 1.6 s,anyandall55 ms instead of 1.2 s, andsumalong either dimension of a 1000×1000 matrix 0.52 instead of 1.6 s. Without #3493, loading CUDACore's KernelAbstractions extension invalidates part of this code and these still take 0.6 to 1 s, so this should go in after it. The extension's image grows from 0.03 to 11 MB and its precompilation from 1.6 to 5 s; load time doesn't change measurably. What thedimsreductions andcumsumstill compile is code that is only inferred, without native code, in upstream package images (JuliaLang/julia#58465).