When your problem is with a particular package, it's often best to file an
issue with the package.
In this case, I bet your CUDA/CUDArt installation is broken, since for me this
works fine:
julia> devices(dev->true) do devlist
device(0)
C = CudaArray(Float64, (10,10))
fill!(C, 2.0)
nothing
end
fill! depends on a hand-written kernel `fill_contiguous`, and if your system is
busted then this function probably didn't get built. What does
Pkg.build("CUDArt") say?
--Tim
On Monday, October 26, 2015 06:30:40 AM Matthew Pearce wrote:
> I'm not having much luck filling a CUDArt.CudaArray matrix with a value.
>
> julia> C = CUDArt.CudaArray(Float64, (10,10))
> CUDArt.CudaArray{Float64,2}(CUDArt.CudaPtr{Float64}(Ptr{Float64} @
> 0x0000000b034a0e00),(10,10),0)
>
> julia> fill!(C, 2.0)
> ERROR: KeyError: (0,"fill_contiguous",Float64) not found
> [inlined code] from essentials.jl:58
> in getindex at dict.jl:719
> in fill! at /home/mcp50/.julia/v0.5/CUDArt/src/arrays.jl:158
>
> The fill! code works when matrix C is created by copying data to the gpu.
> This suggested to me the problem was one of memory allocation. However,
> I've tried variations on this which haven't worked, such as taking some of
> the source code:
>
> julia> function NewCudaArray(T::Type, dims::Dims)
> n = prod(dims)
> p = CUDArt.malloc(T, n)
> CudaArray{T,length(dims)}(p, dims, device())
> end
> NewCudaArray (generic function with 1 method)
>
> julia> C = NewCudaArray(Float64, (10,10))
> CUDArt.CudaArray{Float64,2}(CUDArt.CudaPtr{Float64}(Ptr{Float64} @
> 0x0000000b034a1200),(10,10),0)
>
> julia> fill!(C, 2.0)
> ERROR: KeyError: (0,"fill_contiguous",Float64) not found
> [inlined code] from essentials.jl:58
> in getindex at dict.jl:719
> in fill! at /home/mcp50/.julia/v0.5/CUDArt/src/arrays.jl:158
>
> Copying things across unnecessarily sounds slow, so thoughts appreciated.