Is that possible to specify dimensions in gemm?

In Linear Algebra · The Julia Language
gemm has fewer entries than LAPACK: dgemm, e.g., dimensions of matrices A and B. Specifying dimensions sometimes can let higher dimensional arrays look like matrices
arrays - How to speed up reshape in higher rank tensor contraction by BLAS in Fortran? - Stack Overflow

Is that possible in julia? or has to be used as rank-2 matrix explicitly in Julia?

I don’t know if I am understanding correctly but you could use a view to get a subarray from the original n dimensional array.

They probably want a reshape, not a view. TensorOperarions.jl may also be worth a look.

The specifying dimension in dgemm for higher rank array will avoid reshape.