Hand-Written PTX Tensor-Core GEMM Kernels: A Multi-Precision Study on NVIDIA L4
Not on the map. Why?
Abstract (arXiv)
High-performance Tensor Core kernels rely on a low-level PTX pipeline built from asynchronous data movement with cp.async, warp-level matrix loads with ldmatrix, and matrix multiply-accumulate operations with mma.sync. However, most application code accesses Tensor Cores indirectly through the WMMA C++ API. This paper asks a focused, practical question: when does replacing WMMA with hand-written PTX actually pay off? To answer this question, we conduct a controlled, single-GPU study on an NVIDIA L4 GPU (Ada, SM89), comparing double-buffered WMMA baselines with a family of hand-written PTX GEMM kernels across FP16, INT8, and INT4 arithmetic and square problem sizes from N=512 to N=8192. Every kernel is profiled with Nsight Compute across the full metric set, and PTX speedups are reported relative to the corresponding same-precision WMMA baseline. Hand-written PTX provides no end-to-end speedup for FP16, because its instruction-level gains are offset by operand-packing overhead. In contrast, the PTX kernels achieve consistent speedups of 1.4x-1.8x for INT8, driven primarily by lower instruction counts and better global-memory coalescing, and 2.9x-4.3x for INT4, where native mma.sync.m16n8k64.s4 execution avoids the software-emulated sequence used by the WMMA path. Relative to the FP16 WMMA baseline, the best quantized kernels reach 34.4x (INT8) and 98.7x (INT4) at N=8192. Across these experiments, occupancy is a poor predictor of throughput. For large matrices, performance instead tracks memory-system behavior -- particularly global-load coalescing and DRAM-active cycles -- more closely than Tensor Core utilization. These results identify the precisions and operating regimes in which the additional complexity of hand-written PTX is justified.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 5 of its 15 references that are in the map. First posted on arXiv 10 Aug 2026.
Builds on
5 of 15 references.
References · 5
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
- 2018NVIDIA Tensor Core Programmability, Performance & Precisioncited by 79
- 2018Dissecting the NVIDIA Volta GPU Architecture via Microbenchmarkingcited by 35
- 2022Dissecting Tensor Cores via Microbenchmarks: Latency, Throughput and Numeric Behaviorscited by 10
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Spec Sheets Are Not Kernels: An ISA- and Source-Level Audit of INT8 Availability on NVIDIA Blackwell Ultra
- 2026APEX4: Efficient Pure W4A4 LLM Inference via Intra-SM Compute Rebalancing
- 2024Efficient Arbitrary Precision Acceleration for Large Language Models on GPU Tensor Cores
- 2025APT-LLM: Exploiting Arbitrary-Precision Tensor Core Computing for LLM Acceleration
- 2026KernelBenchX: A Comprehensive Benchmark for Evaluating LLM-Generated GPU Kernels
- 2026SlideSparse: Fast and Flexible (2N-2):2N Structured Sparsity
- 2025Recipes for Pre-training LLMs with MXFP8
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?