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
The following code worked fine with v1.3.3, but is broken with v2.0.1.
using CUDA
dims = (4,4,3)
ad = CUDA.randn(Float32, dims)
ad[:,[1,3],:] .= 0
gives
ERROR: GPU compilation of kernel broadcast_kernel(CUDA.CuKernelContext, SubArray{Float32,4,CuDeviceArray{Float32,4,1},Tuple{Base.Slice{Base.OneTo{Int64}},Array{Int64,1},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}},false}, Base.Broadcast.Broadcasted{Nothing,NTuple{4,Base.OneTo{Int64}},typeof(identity),Tuple{Int64}}, Int64) failed
KernelError: passing and using non-bitstype argument
Argument 3 to your kernel function is of type SubArray{Float32,4,CuDeviceArray{Float32,4,1},Tuple{Base.Slice{Base.OneTo{Int64}},Array{Int64,1},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}},false}, which is not isbits:
.indices is of type Tuple{Base.Slice{Base.OneTo{Int64}},Array{Int64,1},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}} which is not isbits.
.2 is of type Array{Int64,1} which is not isbits.
I see the same error if I break it out into the following:
av = view(ad, :,[1,3],:)
av .= 0
Corresponding CPU/Base code which also works fine:
ah = randn(dims)
ah[:,[1,3],:] .= 0
Is there a workaround or different approach I should be using in 2.0?
The text was updated successfully, but these errors were encountered:
The following code worked fine with v1.3.3, but is broken with v2.0.1.
gives
I see the same error if I break it out into the following:
Corresponding CPU/Base code which also works fine:
Is there a workaround or different approach I should be using in 2.0?
The text was updated successfully, but these errors were encountered: