Başsoy, Cem SavaşCem SavaşBaşsoy2026-01-092026-01-092025-03-22Journal of Computational Science 87: 102568 (2025)https://hdl.handle.net/11420/60738The tensor–matrix multiplication (TTM) is a basic tensor operation required by various tensor methods such as the HOSVD. This paper presents flexible high-performance algorithms that compute the tensor–matrix product according to the Loops-over-GEMM (LOG) approach. The proposed algorithms can process dense tensors with any linear tensor layout, arbitrary tensor order and dimensions all of which can be runtime variable. The paper discusses two slicing methods with orthogonal parallelization strategies and propose four algorithms that call BLAS with subtensors or tensor slices. It also provides a simple heuristic which selects one of the four proposed algorithms at runtime. All algorithms have been evaluated on a large set of tensors with various tensor shapes and linear tensor layouts. In case of large tensor slices, our best-performing algorithm achieves a median performance of 2.47 TFLOPS on an Intel Xeon Gold 5318Y and 2.93 TFLOPS an AMD EPYC 9354. Furthermore, it outperforms batched GEMM implementation of Intel MKL by a factor of 2.57 with large tensor slices. Our runtime tests show that our best-performing algorithm is, on average, at least 6.21% and up to 334.31% faster than frameworks implementing state-of-the-art approaches, including actively developed libraries such as Libtorch and Eigen. For the majority of tensor shapes, it is on par with TBLIS which uses optimized kernels for the TTM computation. Our algorithm performs better than all other competing implementations for the majority of real world tensors from the SDRBench, reaching a speedup of 2x or more for some tensor instances. This work is an extended version of ”Fast and Layout-Oblivious Tensor–Matrix Multiplication with BLAS” (Başsoy 2024).en1877-7503Journal of computational science2025Elsevierhttps://creativecommons.org/licenses/by/4.0/High-performance computingTensor contractionTensor methodsTensor-times-matrix multiplicationComputer Science, Information and General Works::006: Special computer methodsNatural Sciences and Mathematics::518: Numerical AnalysisDesign of a high-performance tensor–matrix multiplication with BLASJournal Articlehttps://doi.org/10.15480/882.1644510.1016/j.jocs.2025.10256810.15480/882.16445Journal Article