-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
cuda arrayStuff about CuArray.Stuff about CuArray.enhancementNew feature or requestNew feature or request
Description
There seems to be a few missing methods for curand. The no argument method returns an array, but should it? And the range method is not defined:
julia> x = CuArrays.CURAND.curand()
0-dimensional CuArray{Float32,0}:
0.15776986
julia> x = CuArrays.CURAND.curand(-1:2:1)
ERROR: MethodError: no method matching CuArray{Float32,N} where N(::UndefInitializer, ::StepRange{Int64,Int64})
Closest candidates are:
CuArray{Float32,N} where N(::UndefInitializer, ::Tuple{Vararg{Int64,N}}) where {T, N} at C:\Users\user\.julia\dev\CuArrays\src\array.jl:45
CuArray{Float32,N} where N(::UndefInitializer, ::Integer...) where T at C:\Users\user\.julia\dev\CuArrays\src\array.jl:46
CuArray{Float32,N} where N(::Function, ::Any...) where T at C:\Users\user\.julia\dev\CuArrays\src\array.jl:56
Stacktrace:
[1] #curand#22(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Type{Float32}, ::StepRange{Int64,Int64}, ::Vararg{Any,N} where N) at C:\Users\user\.julia\dev\CuArrays\src\rand\highlevel.jl:81
[2] curand(::Type{Float32}, ::StepRange{Int64,Int64}) at C:\Users\user\.julia\dev\CuArrays\src\rand\highlevel.jl:81
[3] #curand#26(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::StepRange{Int64,Int64}) at C:\Users\user\.julia\dev\CuArrays\src\rand\highlevel.jl:87
[4] curand(::StepRange{Int64,Int64}) at C:\Users\user\.julia\dev\CuArrays\src\rand\highlevel.jl:87
[5] top-level scope at none:0I am sure there are more, but these are the ones that came up in the context of https://github.com/luca-aki/TraceEstimation.jl, where an input rand function is to be given that is assumed to have the above methods defined.
CC: @luca-aki
Metadata
Metadata
Assignees
Labels
cuda arrayStuff about CuArray.Stuff about CuArray.enhancementNew feature or requestNew feature or request