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 #554

Closed
jeremypparker opened this issue Aug 25, 2024 · 0 comments · Fixed by #555
Closed

copyto! ambiguous #554

jeremypparker opened this issue Aug 25, 2024 · 0 comments · Fixed by #555

Comments

@jeremypparker
Copy link

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
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 a pull request may close this issue.

1 participant