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
Found the following problem with multiplication of a discontinuous view by a matrix
x =ones(Float32,2,2) |> MtlArray
y =ones(Float32,4,2) |> MtlArray
yv =view(y, 1:2, :)
x * yv
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] scalar_getindex
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/indexing.jl:36 [inlined]
[7] _getindex
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/indexing.jl:19 [inlined]
[8] getindex
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/indexing.jl:17 [inlined]
[9] matmul2x2!(C::MtlMatrix{…}, tA::Char, tB::Char, A::MtlMatrix{…}, B::SubArray{…}, _add::LinearAlgebra.MulAddMul{…})
@ LinearAlgebra ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:943
[10] gemm_wrapper!(C::MtlMatrix{…}, tA::Char, tB::Char, A::MtlMatrix{…}, B::SubArray{…}, _add::LinearAlgebra.MulAddMul{…})
@ LinearAlgebra ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:644
[11] generic_matmatmul!
@ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:381 [inlined]
[12] _mul!
@ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:287 [inlined]
[13] mul!
@ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:285 [inlined]
[14] mul!
@ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:253 [inlined]
[15] *(A::MtlMatrix{Float32, Metal.PrivateStorage}, B::SubArray{Float32, 2, MtlMatrix{…}, Tuple{…}, false})
@ LinearAlgebra ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/matmul.jl:124
[16] top-level scope
@ ~/.julia/dev/Flux/prova.jl:24
Some type information was truncated. Use `show(err)` to see complete types.
julia> Metal.versioninfo()
macOS 14.6.1, Darwin 23.6.0
Toolchain:- Julia:1.11.0- LLVM:16.0.6
Julia packages:- Metal.jl:1.4.1- GPUArrays:10.3.1- GPUCompiler:0.27.8- KernelAbstractions:0.9.28- ObjectiveC:3.1.0- LLVM:9.1.2- LLVMDowngrader_jll:0.3.0+11 device:- Apple M1 Pro (640.000 KiB allocated)
The text was updated successfully, but these errors were encountered:
I'm new here but I believe this is something that cannot be adressed (i.e. remains unsupported as the error message indicates), until GPUArrays.jl provides functionality for such operations.
Found the following problem with multiplication of a discontinuous view by a matrix
The text was updated successfully, but these errors were encountered: