Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copyto! ambiguous #2477

Closed
jeremypparker opened this issue Aug 25, 2024 · 1 comment
Closed

copyto! ambiguous #2477

jeremypparker opened this issue Aug 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jeremypparker
Copy link

jeremypparker commented Aug 25, 2024

I'm getting the following error while trying to copy an array into GPU memory. It's fairly self-explanatory and seems like a bug to me

MethodError: copyto!(::CuArray{Float64, 1, CUDA.DeviceMemory}, ::CartesianIndices{1, Tuple{UnitRange{Int64}}}, ::Vector{Float64}, ::CartesianIndices{1, Tuple{UnitRange{Int64}}}) is ambiguous.
    
    Candidates:
      copyto!(dst::GPUArraysCore.AbstractGPUArray{T, N}, dstrange::CartesianIndices{N, R} where R<:Tuple{Vararg{OrdinalRange{Int64, Int64}, N}}, src::Array{T, N}, srcrange::CartesianIndices{N, R} where R<:Tuple{Vararg{OrdinalRange{Int64, Int64}, N}}) where {T, N}
        @ GPUArrays ~/.julia/packages/GPUArrays/8Y80U/src/host/abstractarray.jl:272
      copyto!(dest::GPUArraysCore.AnyGPUArray, d_range::CartesianIndices{1, R} where R<:Tuple{OrdinalRange{Int64, Int64}}, src::Array, s_range::CartesianIndices{1, R} where R<:Tuple{OrdinalRange{Int64, Int64}})
        @ GPUArrays ~/.julia/packages/GPUArrays/8Y80U/src/host/abstractarray.jl:159
    
    Possible fix, define
      copyto!(::GPUArraysCore.AbstractGPUVector{T}, ::CartesianIndices{1, R} where R<:Tuple{OrdinalRange{Int64, Int64}}, ::Vector{T}, ::CartesianIndices{1, R} where R<:Tuple{OrdinalRange{Int64, Int64}}) where T

Edit: obviously I should have raised this on the GPUArrays repository...
JuliaGPU/GPUArrays.jl#554

@jeremypparker jeremypparker added the bug Something isn't working label Aug 25, 2024
@maleadt
Copy link
Member

maleadt commented Aug 26, 2024

Closing in favor of JuliaGPU/GPUArrays.jl#554

@maleadt maleadt closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants