You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, CUDA (as of 3.9.0) does not have such kernel either:
using CUDA; repeat(cu(ones(2,2)),1,1,3)
┌ Warning: Performing scalar indexing on task Task (runnable) @0x00007f7d738a0010.
│ Invocation of getindex resulted in scalar indexing of a GPU array.
│ This is typically caused by calling an iterating implementation of a method.
│ Such implementations *do not* execute on the GPU, but very slowly on the CPU,
│ and therefore are only permitted from the REPL for prototyping purposes.
│ If you did intend to index this array, annotate the caller with @allowscalar.
I was using
repeat()
function to replicate a Float64 array and the following code seems to be working:a = randn(256, 5)
repeat(a,16,16)
but when I cast the array to a KnetArray type and try again,
a = KnetArray{}(randn(256, 5))
repeat(a,16,16)
I encounter the following error:
MethodError: no method matching repeat(::KnetArray{Float64,2}, ::Int64, ::Int64) Closest candidates are: repeat(!Matched::Union{GPUArrays.AbstractGPUArray{T,2}, GPUArrays.AbstractGPUArray{T,1}} where T, ::Int64, ::Int64) at C:\Users\canbe\.julia\packages\GPUArrays\Ck0bk\src\host\base.jl:3 repeat(!Matched::Union{AbstractArray{T,2}, AbstractArray{T,1}} where T, ::Integer, ::Integer) at abstractarraymath.jl:275 repeat(!Matched::AbstractArray, ::Integer...) at abstractarraymath.jl:273 ...
It looks like
repeat()
does not support KnetArray type. I'm using Julia Version 1.5.2 and Knet v1.4.3The text was updated successfully, but these errors were encountered: