In-Place Matrix Transposition on GPUs
- 12 March 2015
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Parallel and Distributed Systems
- Vol. 27 (3) , 776-788
Abstract
Matrix transposition is an important algorithmic building block for many numeric algorithms such as FFT. With more and more algebra libraries offloading to GPUs, a high performance in-place transposition becomes necessary. Intuitively, in-place transposition should be a good fit for GPU architectures due to limited available on-board memory capacity and high throughput. However, direct application of CPU in-place transposition algorithms lacks the amount of parallelism and locality required by GPU to achieve good performance. In this paper we present our in-place matrix transposition approach for GPUs that is performed using elementary tile-wise transpositions. We propose low-level optimizations for the elementary transpositions, and find the best performing configurations for them. Then, we compare all sequences of transpositions that achieve full transposition, and detect which is the most favorable for each matrix. We present an heuristic to guide the selection of tile sizes, and compare them to brute-force search. We diagnose the drawback of our approach, and propose a solution using minimal padding. With fast padding and unpadding kernels, the overall throughput is significantly increased. Finally, we compare our method to another recent implementation.Keywords
Funding Information
- Starnet Center for Future Architecture Research
- Center of Excellence
- Nvidia
- Ministry of Education of Spain (TIN2010-16144)
- Junta de Andalucía of Spain (TIC-1692)
This publication has 13 references indexed in Scilit:
- In-place transposition of rectangular matrices on accelerators2014
- A decomposition for in-place matrix transposition2014
- StreamScan2013
- DL: A data layout transformation system for heterogeneous computing2012
- Parallel and Cache-Efficient In-Place Matrix Storage Format ConversionACM Transactions on Mathematical Software, 2012
- Auto-tuning of fast fourier transform on graphics processors2011
- Efficient transposition algorithms for large matrices1993
- Algorithm 513: Analysis of In-Situ Transposition [F1]ACM Transactions on Mathematical Software, 1977
- Transposing Matrices in a Digital ComputerThe Computer Journal, 1959
- A Method for Transposing a MatrixJournal of the ACM, 1958