Skip to content

Commit 4e28332

Browse files
Fix GPU ArrayPartition any/all: load AnyAll subpackage in GPU tests
The GPU test uses `all(pA .== true)` on ArrayPartition with CuArrays, which triggers scalar indexing via the AbstractArray element-by-element fallback. Fix by loading RecursiveArrayToolsArrayPartitionAnyAll in the GPU test environment, which provides partition-level any/all that dispatches to GPU kernels per sub-array. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6a779d4 commit 4e28332

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

test/gpu/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
33
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
4+
RecursiveArrayToolsArrayPartitionAnyAll = "172d604e-c495-4f00-97bf-d70957099afa"
45

56
[compat]
67
CUDA = "3.12, 4, 5"

test/gpu/arraypartition_gpu.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using RecursiveArrayTools, ArrayInterface, CUDA, Adapt, Test
1+
using RecursiveArrayTools, RecursiveArrayToolsArrayPartitionAnyAll, ArrayInterface, CUDA, Adapt, Test
22
CUDA.allowscalar(false)
33

44
# Test indexing with colon

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ end
1717
function activate_gpu_env()
1818
Pkg.activate("gpu")
1919
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
20+
Pkg.develop(PackageSpec(
21+
path = joinpath(dirname(@__DIR__), "lib", "RecursiveArrayToolsArrayPartitionAnyAll")))
2022
return Pkg.instantiate()
2123
end
2224

0 commit comments

Comments
 (0)