arrow
Return

Kernel Float: Unlocking Mixed-Precision GPU Programming

delete2026-03-01
delete2
PRE
AI
S
Stijn Heldens *
B
Ben van Werkhoven
DOI:10.1145/3779120delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Modern GPUs feature specialized hardware for low-precision floating-point arithmetic to accelerate compute-intensive workloads that do not require high numerical accuracy, such as those from artificial intelligence. However, despite the significant gains in computational throughput, memory bandwidth utilization, and energy efficiency, integrating low-precision formats into scientific applications remains difficult. We introduce Kernel Float, a header-only C++ library that simplifies the development of portable mixed-precision GPU kernels. Kernel Float provides a generic vector type, a unified interface for common mathematical operations, and fast approximations for low-precision transcendental functions that lack native hardware support. To demonstrate the potential of mixed-precision computing unlocked by our library, we integrated Kernel Float into nine GPU kernels from various domains. Our evaluation on Nvidia A100 and AMD MI250X GPUs shows performance improvements of up to 12 & times; over double precision, while reducing source code length by up to 50% compared to handwritten kernels and having negligible runtime overhead. Our results further show that mixed-precision performance depends not only on choosing appropriate data types but also on tuning traditional optimization parameters (e.g., block size and vector width) and, when relevant, even domain-specific parameters.
Keywords:
Mixed-precision programming
GPU computing
CUDA
HIP
High-performance computing

Journal

ACM Transactions on Mathematical Software cover
ACM Transactions on Mathematical Software
IF:
3.2
Papers:
35
Citations:
5.1K

Organization

L
leiden university - excl lumc
Scholars:
3.5W
Papers: 2.9W
Citations: 46
L
leiden university
Scholars:
2.6K
Papers: 1.3K
Citations: 0
Cited Papers

Cited Papers

errShare
errSave
Ginkgo: A Modern Linear Operator Algebra Framework for High Performance Computing
err2022-02-16
err0
errOAAI
errHartwig Anzt; Terry Cojean; Goran Flegar; Fritz Göbel; Thomas Grützmacher; Pratik Nayak; Tobias Ribizel; Yuhsiang Mike Tsai; Enrique S. Quintana-Ortí
errShare
errSave
AxBench: A Multiplatform Benchmark Suite for Approximate Computing
err2017-04-01
err0
errOAAI
errAmir Yazdanbakhsh; Divya Mahajan; Hadi Esmaeilzadeh; Pejman Lotfi-Kamran
errShare
errSave
The Landscape of Exascale Research: A Data-Driven Literature Analysis
err2020-03-20
err38
errOAAI
errHeldens, Stijn; Hijma, Pieter; van Werkhoven, Ben; Maassen, Jason; Belloum, Adam S. Z.; Van Nieuwpoort, Rob V.
errShare
errSave
GRAM
err2021-02-09
err0
errOAAI
errNhut-Minh Ho; Himeshi De silva; Weng-Fai Wong
errShare
errSave
MPFR
err2007-06-01
err0
PREAI
errLaurent Fousse; Guillaume Hanrot; Vincent Lefèvre; Patrick Pélissier; Paul Zimmermann
errShare
errSave
researcher View more