[Paper Review] cuTT: A High-Performance Tensor Transpose Library for CUDA Compatible GPUs
cuTT is a high-performance CUDA library for tensor transpose operations on NVIDIA GPUs with Kepler and later architectures. It achieves rank-independent performance using two shared-memory-optimized transpose algorithms and a thread-parallel memory indexing scheme, reducing tensor contraction overhead to as low as 1% in integrated workloads.
We introduce the CUDA Tensor Transpose (cuTT) library that implements high-performance tensor transposes for NVIDIA GPUs with Kepler and above architectures. cuTT achieves high performance by (a) utilizing two GPU-optimized transpose algorithms that both use a shared memory buffer in order to reduce global memory access scatter, and by (b) computing memory positions of tensor elements using a thread-parallel algorithm. We evaluate the performance of cuTT on a variety of benchmarks with tensor ranks ranging from 2 to 12 and show that cuTT performance is independent of the tensor rank and that it performs no worse than an approach based on code generation. We develop a heuristic scheme for choosing the optimal parameters for tensor transpose algorithms by implementing an analytical GPU performance model that can be used at runtime without need for performance measurements or profiling. Finally, by integrating cuTT into the tensor algebra library TAL-SH, we significantly reduce the tensor transpose overhead in tensor contractions, achieving as low as just one percent overhead for arithmetically intensive tensor contractions.
Motivation & Objective
- To address the performance bottleneck of tensor transpose operations in GPU-accelerated tensor algebra workloads.
- To design a library that maintains high performance across tensor ranks from 2 to 12 without relying on profile-driven tuning.
- To develop a runtime heuristic for selecting optimal transpose algorithm parameters using an analytical GPU performance model.
- To minimize overhead in tensor contractions by integrating a highly optimized transpose kernel into the TAL-SH tensor algebra library.
Proposed method
- The library employs two GPU-optimized transpose algorithms, both leveraging shared memory to reduce global memory access scatter.
- It computes tensor element memory addresses in parallel using a thread-parallel algorithm to minimize divergence and maximize coalescing.
- A heuristic parameter selection scheme is built on an analytical GPU performance model that estimates latency and occupancy without requiring profiling.
- The performance model enables dynamic selection of optimal block size and tile dimensions at runtime based on tensor rank and shape.
- The library is integrated into the TAL-SH tensor algebra library to evaluate end-to-end performance in tensor contractions.
- cuTT supports tensor ranks from 2 to 12, with performance independent of rank due to algorithmic optimization.
Experimental results
Research questions
- RQ1Can a tensor transpose library achieve high performance across a wide range of tensor ranks without relying on profile-based tuning?
- RQ2How can optimal algorithm parameters for tensor transpose be selected at runtime without performance measurements?
- RQ3To what extent can tensor transpose overhead be reduced in tensor contraction workloads using an optimized kernel?
- RQ4Does the use of shared memory and thread-parallel indexing significantly improve memory access patterns in tensor transposes?
- RQ5Can an analytical performance model accurately guide parameter selection for tensor transpose kernels on modern GPUs?
Key findings
- cuTT achieves performance independent of tensor rank, maintaining high efficiency across ranks from 2 to 12.
- The library's performance is no worse than a code-generation-based approach, demonstrating competitive optimization.
- The analytical performance model enables effective runtime parameter selection without profiling or benchmarking.
- Integration of cuTT into TAL-SH reduces tensor transpose overhead in arithmetically intensive contractions to as low as 1%.
- The use of shared memory and thread-parallel memory indexing significantly reduces global memory access scatter and improves bandwidth utilization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.