Repository navigation
Conversation
AMDGPU's workload doesn't use the GPU, which isn't discovered while AMDGPU precompiles, so the first reduction, scan or predicate of a session compiles AcceleratedKernels' host code and kernels. Run them in the workload of a new AMDGPU extension, which precompiles with AMDGPU loaded and ROCm discovered, when there is a device. The arrays are just large enough to select the kernels that a vector of 10^6 elements and a 1000×1000 matrix do. Like AMDGPU's own workload, it needs Julia 1.12. On a gfx1036 with Julia 1.13, the first `sum` of 10^6 elements takes 17 ms instead of 1.1 s, `cumsum` 0.21 s instead of 1.4 s, `any` and `all` 70 ms instead of 1.1 s, and `sum` along either dimension of a 1000×1000 matrix 0.45 s instead of 1.6 s. The extension's image is 9 MB, and it takes 4 s to precompile.
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.
AMDGPU's precompilation workload doesn't use the GPU, which isn't even discovered while AMDGPU precompiles, so the first reduction, scan or predicate of a session compiles AcceleratedKernels' host code and kernels.
This runs them in the workload of a new AMDGPU extension, which precompiles with AMDGPU loaded and ROCm discovered, when there is a device.
AMDGPU.functional()only checks that ROCm's libraries were found, so the guard also counts the devices (with the unchecked HIP call; older AMDGPU versions without it skip the workload). The arrays are just large enough to select the kernels that a vector of 10^6 elements and a 1000×1000 matrix do; at AMDGPU's default tunings that takes longer matrix columns than on CUDA. Like AMDGPU's own workload it needs Julia 1.12.On a gfx1036 with Julia 1.13, the first
sumof 10^6 elements takes 17 ms instead of 1.1 s,cumsum0.21 instead of 1.4 s,anyandall70 ms instead of 1.1 s, andsumalong either dimension of a 1000×1000 matrix 0.45 instead of 1.6 s. The extension's image is 9 MB and takes 4 s to precompile; load time doesn't change measurably.