View + LinearAlgebra.BLAS.gemm!

try to use:

LinearAlgebra.BLAS.gemm!('T', 'N', one(T), view(mx,  block, :), A, one(T), B)

where block - Vector{Int}

and have:

ERROR: ArgumentError: strides is invalid for SubArrays with indices of type Vector{Int64}

can I use views with LinearAlgebra.BLAS.gemm!?

Consider using the 5 argument mul! also from LinearAlgebra

1 Like

The underlying BLAS API doesn’t support views with an arbitrary vector of indices.

(You can use mul!, but realize that you will pay a performance price compared to BLAS multiplies because it is falling back to the generic multiplication routine.)

1 Like

Thank you! mul! works fine, but I didn’t make a deep benchmark :smile_cat: