Repository navigation
Use GPUArrays 12's reductions, sorting, scans and findall - #1145
Merged
Merged
Conversation
This was referenced Oct 7, 2026
maleadt
marked this pull request as ready for review
October 7, 2026 06:17
maleadt
force-pushed
the
tb/gpuarrays-12
branch
2 times, most recently
from
October 7, 2026 14:33
b036939 to
aa75147
Compare
Contributor
AMDGPU.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
This was referenced Oct 8, 2026
maleadt
force-pushed
the
tb/gpuarrays-12
branch
2 times, most recently
from
October 8, 2026 20:02
fa82819 to
fb25900
Compare
GPUArrays 12 removes default_rng, and nothing outside AMDGPU called AMDGPU's method for it.
GPUArrays 12 implements these once for every GPU array on top of AcceleratedKernels and removes the mapreducedim! hook, so delete AMDGPU's own reduction kernel and its sort!, sortperm!, accumulate, findall, logical indexing and reverse methods. The vector sort! and sortperm! methods were ambiguous with GPUArrays', and the scans called AcceleratedKernels 0.4's API. AMDGPU no longer depends on AcceleratedKernels directly; its AMDGPU extension still loads through GPUArrays.
maleadt
force-pushed
the
tb/gpuarrays-12
branch
from
October 9, 2026 11:05
fb25900 to
3c2458d
Compare
Base.dataids returned the array's own pointer, which missed overlaps between a contiguous view (a ROCArray at an offset) and a wrapped array of the same memory, made every empty ROCArray alias every other one (all have address 0; AcceleratedKernels' alias checks rejected that on Julia 1.10), and made disjoint views of one buffer alias. GPUArrays 12.1 defines `Base.dataids` and `Base.mightalias` for every GPU array from where its elements live, so implement that hook instead, using the buffer's device address rather than `pointer`, which takes stream ownership of the memory.
maleadt
force-pushed
the
tb/gpuarrays-12
branch
from
October 10, 2026 14:19
3c2458d to
70f2603
Compare
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.
Ports AMDGPU.jl to GPUArrays 12, which implements Base's reductions, sorting, scans,
findall, logical indexing andreverseonce for every GPU array, on AcceleratedKernels 0.5 (JuliaGPU/GPUArrays.jl#790), and removes theGPUArrays.mapreducedim!hook.sort!/sortperm!, scans,findall, logical indexing andreverse(src/kernels/). The vectorsort!/sortperm!were ambiguous with GPUArrays' methods, and the scans used AcceleratedKernels 0.4's API.0.3.1, 0.4, couldn't load AK 0.5 anyway.)GPUArrays.default_rngis gone in GPUArrays 12; the RNG lives ingpuarrays_rng().Intended as a minor release.
Tested on gfx1036 (Julia 1.13):
core/rocarray_base,hip_rocarray, the GPUArrays testsuite and the KernelAbstractions tests, 17,968 pass. The 3cholesky(::Diagonal)errors are fixed in Adapt 4.7.3.