Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

zero-size alloc before initialization errors #538

Closed
maleadt opened this issue Dec 13, 2019 · 0 comments · Fixed by #551
Closed

zero-size alloc before initialization errors #538

maleadt opened this issue Dec 13, 2019 · 0 comments · Fixed by #551
Labels

Comments

@maleadt
Copy link
Member

maleadt commented Dec 13, 2019

julia> using CuArrays

julia> CuArray{Int}(undef, 0)
ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type CUDAdrv.CuContext
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:168
Stacktrace:
 [1] CuArray{Int64,1,Nothing}(::CUDAdrv.CuPtr{Int64}, ::Tuple{Int64}, ::Nothing, ::Bool, ::Nothing) at /home/tim/Julia/pkg/CuArrays/src/array.jl:15
 [2] #_#10(::Nothing, ::Type{CuArray{Int64,1,P} where P}, ::CUDAdrv.CuPtr{Int64}, ::Tuple{Int64}, ::Bool) at /home/tim/Julia/pkg/CuArrays/src/array.jl:22
 [3] CuArray{Int64,1,P} where P(::CUDAdrv.CuPtr{Int64}, ::Tuple{Int64}, ::Bool) at /home/tim/Julia/pkg/CuArrays/src/array.jl:22 (repeats 2 times)
 [4] CuArray{Int64,1,P} where P(::UndefInitializer, ::Tuple{Int64}) at /home/tim/Julia/pkg/CuArrays/src/array.jl:91
 [5] CuArray at /home/tim/Julia/pkg/CuArrays/src/array.jl:98 [inlined]
 [6] CuArray{Int64,N,P} where P where N(::UndefInitializer, ::Int64) at /home/tim/Julia/pkg/CuArrays/src/array.jl:99
 [7] top-level scope at REPL[2]:1
@maleadt maleadt added the bug label Dec 13, 2019
maleadt added a commit that referenced this issue Jan 6, 2020
maleadt added a commit that referenced this issue Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant