LP-GEMM: Integrating Layout Propagation into GEMM Operations
Not on the map. Why?
Abstract (arXiv)
In Scientific Computing and modern Machine Learning (ML) workloads, sequences of dependent General Matrix Multiplications (GEMMs) often dominate execution time. While state-of-the-art BLAS libraries aggressively optimize individual GEMM calls, they remain constrained by the BLAS API, which requires each call to independently pack input matrices and restore outputs to a canonical memory layout. In sequential GEMMs, these constraints cause redundant packing and unpacking, wasting valuable computational resources. This paper introduces LP-GEMM, a decomposition of the GEMM kernel that enables packing-layout propagation across sequential GEMM operations. This approach eliminates unnecessary data repacking while preserving full BLAS semantic correctness at the boundaries. We evaluate LP-GEMM on x86 (AVX-512) and RISC-V (RVV 1.0) architectures across MLP-like and Attention-like workloads. Our results show average speedups of 2.25x over OpenBLAS on Intel x86 for sequential GEMMs and competitive gains relative to vendor-optimized libraries such as Intel MKL. We demonstrate the practicality of the approach beyond microbenchmarks by implementing a standalone C++ version of the Llama-3.2 inference path using exclusively BLAS-level GEMM calls. These results confirm that leveraging data layout propagation between operations can significantly boost performance.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 26 references that are in the map. First posted on arXiv 6 Apr 2026.
Builds on
11 of 26 references.
References · 11
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Modelscited by 150
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 118
- 2019Gemmini: Enabling Systematic Deep-Learning Architecture Evaluation via Full-Stack Integrationcited by 59
- 2018Optimizing CNN Model Inference on CPUscited by 29
- 2024More Asymmetry Yields Faster Matrix Multiplicationcited by 27
- 2023oneDNN Graph Compiler: A Hybrid Approach for High-Performance Deep Learning Compilationcited by 7
- 2024Hello SME! Generating Fast Matrix Multiplication Kernels Using the Scalable Matrix Extensioncited by 5
- 2025Library Liberation: Competitive Performance Matmul Through Compiler-composed Nanokernelscited by 2
- 2019swTVM: Towards Optimized Tensor Code Generation for Deep Learning on Sunway Many-Core Processorcited by 1
Built on by
Not cited yet.