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
I get the scalar indexing error when performing kron on two CuVectors.
To reproduce
The Minimal Working Example (MWE) for this bug:
x = CUDA.rand(100)
y = CUDA.rand(100)
kron(x, y)
ERROR: Scalar indexing is disallowed.
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 should be avoided.
If you want to allow scalar iteration, use `allowscalar` or `@allowscalar`
to enable scalar iteration globally or for the operations in question.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] errorscalar(op::String)
@ GPUArraysCore ~/.julia/packages/GPUArraysCore/GMsgk/src/GPUArraysCore.jl:155
[3] _assertscalar(op::String, behavior::GPUArraysCore.ScalarIndexing)
@ GPUArraysCore ~/.julia/packages/GPUArraysCore/GMsgk/src/GPUArraysCore.jl:128
[4] assertscalar(op::String)
@ GPUArraysCore ~/.julia/packages/GPUArraysCore/GMsgk/src/GPUArraysCore.jl:116
[5] getindex
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/indexing.jl:50 [inlined]
[6] kron!(c::Vector{Float32}, a::CuArray{Float32, 1, CUDA.DeviceMemory}, b::CuArray{Float32, 1, CUDA.DeviceMemory})
@ LinearAlgebra ~/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/share/julia/stdlib/v1.11/LinearAlgebra/src/dense.jl:402
[7] kron(a::CuArray{Float32, 1, CUDA.DeviceMemory}, b::CuArray{Float32, 1, CUDA.DeviceMemory})
@ LinearAlgebra ~/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/share/julia/stdlib/v1.11/LinearAlgebra/src/dense.jl:499
[8] top-level scope
@ ~/GitHub/Research/Undef/GPU Benchmark/GPU Benchmark.jl:14
Describe the bug
I get the scalar indexing error when performing
kron
on twoCuVector
s.To reproduce
The Minimal Working Example (MWE) for this bug:
Manifest.toml
Version info
Details on Julia:
Details on CUDA:
The text was updated successfully, but these errors were encountered: