Skip to content

GPU: method disambiguation from GPUArraysCore getindex#683

Merged
jpsamaroo merged 2 commits intomasterfrom
fda/gpu
Feb 17, 2026
Merged

GPU: method disambiguation from GPUArraysCore getindex#683
jpsamaroo merged 2 commits intomasterfrom
fda/gpu

Conversation

@fda-tome
Copy link
Copy Markdown
Collaborator

@fda-tome fda-tome commented Feb 17, 2026

There is an ambiguous method for GPUArrays:

ERROR: MethodError: getindex(::CuArray{Bool, 2, CUDA.DeviceMemory}, ::ArrayDomain{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}) is ambiguous.

Candidates:
  getindex(A::GPUArraysCore.AbstractGPUArray, Is...)
    @ GPUArrays ~/.julia/packages/GPUArrays/nc02F/src/host/indexing.jl:17
  getindex(arr::AbstractArray, d::ArrayDomain)
    @ Dagger ~/.julia/packages/Dagger/Mpl5a/src/array/darray.jl:34

The reproducer for this is:

using Dagger, CUDA
A = CUDA.rand(Bool, 64, 64)
DA = DArray(A, Blocks(16, 16))   # ambiguous getindex before fix
collect(DA)

@jpsamaroo jpsamaroo merged commit f6fcfb3 into master Feb 17, 2026
9 of 16 checks passed
@jpsamaroo jpsamaroo deleted the fda/gpu branch February 17, 2026 20:53
@jpsamaroo
Copy link
Copy Markdown
Member

Thanks so much for finding and fixing this! That would be really frustrating to encounter for new GPU users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants