Abstract
We explore the floating-point arithmetic implemented in the NVIDIA tensor cores, which are hardware accelerators for mixed-precision matrix multiplication available on the Volta, Turing, and Ampere microarchitectures. Using Volta V100, Turing T4, and Ampere A100 graphics cards, we determine what precision is used for the intermediate results, whether subnormal numbers are supported, what rounding mode is used, in which order the operations underlying the matrix multiplication are performed, and whether partial sums are normalized. These aspects are not documented by NVIDIA, and we gain insight by running carefully designed numerical experiments on these hardware units. Knowing the answers to these questions is important if one wishes to: (1) accurately simulate NVIDIA tensor cores on conventional hardware; (2) understand the differences between results produced by code that utilizes tensor cores and code that uses only IEEE 754-compliant arithmetic operations; and (3) build custom hardware whose behavior matches that of NVIDIA tensor cores. As part of this work we provide a test suite that can be easily adapted to test newer versions of the NVIDIA tensor cores as well as similar accelerators from other vendors, as they become available. Moreover, we identify a non-monotonicity issue affecting floating point multi-operand adders if the intermediate results are not normalized after each step.
Highlights
One hundred and twelve of the computers in the June 2020 TOP500 list,1 feature NVIDIA graphics processing units (GPUs) based on the Volta, Turing, and Ampere microarchitectures
We show that the additions in (2) are performed starting from the operand that is largest in magnitude, that at least 2 extra bits are used for carries, and that (2)
We found that all of the properties that we have found about the tensor cores in V100 GPUs are present in the second version of tensor cores in the T4 GPUs, except the extra bit at the bottom of the internal storage of the 5-operand adder
Summary
One hundred and twelve of the computers in the June 2020 TOP500 list, feature NVIDIA graphics processing units (GPUs) based on the Volta, Turing, and Ampere microarchitectures. A prominent feature of these microarchitectures is tensor cores, which are specialized hardware accelerators for performing the matrix multiply-accumulate. Matrix dimensions Input format Output format Reference NVIDIA T4. Binary (Google, 2020) binary (Google, 2020) binary (NVIDIA, 2017) binary (NVIDIA, 2018) binary (Arm Limited, 2020)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.