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

Conversion issue #157

Closed
MikeInnes opened this issue Nov 14, 2018 · 2 comments
Closed

Conversion issue #157

MikeInnes opened this issue Nov 14, 2018 · 2 comments
Labels
bug Something isn't working cuda array Stuff about CuArray.

Comments

@MikeInnes
Copy link
Contributor

Related to JuliaGPU/CuArrays.jl#200, but without the adapt issue.

julia> convert(CuArray, 1:3)
ERROR: MethodError: no method matching similar(::Type{CuArray}, ::Type{Int64}, ::Tuple{Int64})
Closest candidates are:
  similar(::Array, ::Type, ::Tuple{Vararg{Int64,N}}) where N at array.jl:332
  similar(::SubArray, ::Type, ::Tuple{Vararg{Int64,N}} where N) at subarray.jl:59
  similar(::Base.ReshapedArray, ::Type, ::Tuple{Vararg{Int64,N}} where N) at reshapedarray.jl:187
  ...
Stacktrace:
 [1] convert(::Type{CuArray}, ::UnitRange{Int64}) at /home/mikeinnes/.julia/packages/GPUArrays/HmVTY/src/construction.jl:67
 [2] top-level scope at none:0
@maleadt maleadt transferred this issue from JuliaGPU/CuArrays.jl May 27, 2020
@maleadt maleadt added bug Something isn't working cuda array Stuff about CuArray. labels May 27, 2020
@ToucheSir
Copy link
Contributor

AFAICT this works without a hitch now :)

julia> convert(CuArray, 1:3)
3-element CuArray{Int64, 1, CUDA.Mem.DeviceBuffer}:
 1
 2
 3

@maleadt
Copy link
Member

maleadt commented Oct 25, 2021

Great, thanks for confirming!

@maleadt maleadt closed this as completed Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda array Stuff about CuArray.
Projects
None yet
Development

No branches or pull requests

3 participants