Fast Inference with Kronecker-Sparse Matrices
Not on the map. Why?
Abstract (arXiv)
Kronecker-sparse (KS) matrices -- whose supports are Kronecker products of identity and all-ones blocks -- underpin the structure of Butterfly and Monarch matrices and offer the promise of more efficient models. However, existing GPU kernels for KS matrix multiplication suffer from high data movement costs, with up to 50% of time spent on memory-bound tensor permutations. We propose a fused, output-stationary GPU kernel that eliminates these overheads, reducing global memory traffic threefold. Across 600 KS patterns, our kernel achieves in FP32 a median speedup of x1.4 and lowers energy consumption by 15%. A simple heuristic based on KS pattern parameters predicts when our method outperforms existing ones. We release all code at github.com/PascalCarrivain/ksmm, including a PyTorch-compatible KSLinear layer, and demonstrate in FP32 end-to-end latency reductions of up to 22% in ViT-S/16 and 16% in GPT-2 medium.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 15 of its 44 references that are in the map. First posted on arXiv 23 May 2024.
Builds on
15 of 44 references.
References · 15
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2015Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Codingcited by 2,329
- 2021Scaling Vision Transformerscited by 999
- 2022Monarch: Expressive Structured Matrices for Efficient and Accurate Trainingcited by 106
- 2019Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizationscited by 76
- 2021Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Modelscited by 76
- 2022TorchSparse: Efficient Point Cloud Inference Enginecited by 73
- 2023Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecturecited by 63
- 2022SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learningcited by 47
- 2020Kaleidoscope: An Efficient, Learnable Representation For All Structured Linear Mapscited by 36
- 2019Butterfly Transform: An Efficient FFT Based Neural Architecture Designcited by 16
Built on by
Not cited yet.