[Paper Review] Implementation of float-float operators on graphics hardware
This paper presents a software-level emulation of 44-bit floating-point arithmetic on GPUs using a float-float representation, combining two single-precision floats to achieve higher precision. The approach leverages GPU stream processing for high-performance, accurate operations in applications requiring more precision than single-precision hardware natively provides, with measured accuracy within expected theoretical bounds for most operations.
The Graphic Processing Unit (GPU) has evolved into a powerful and flexible processor. The latest graphic processors provide fully programmable vertex and pixel processing units that support vector operations up to single floating-point precision. This computational power is now being used for general-purpose computations. However, some applications require higher precision than single precision. This paper describes the emulation of a 44-bit floating-point number format and its corresponding operations. An implementation is presented along with performance and accuracy results.
Motivation & Objective
- To address the lack of double-precision floating-point support in GPUs, which limits accuracy in high-precision applications.
- To enable higher-precision arithmetic on GPU hardware that only natively supports single-precision floating-point operations.
- To develop and evaluate a software-based float-float representation that emulates 44-bit precision using two 32-bit floats.
- To assess the performance and accuracy of the float-float implementation on modern GPUs, particularly in comparison to CPU-based counterparts.
- To identify and address precision issues in the implementation, especially in edge cases involving opposite-sign operands.
Proposed method
- The float-float representation stores a number as the sum of two single-precision floating-point numbers, enabling higher precision than standard 32-bit floats.
- Basic arithmetic operations—addition, multiplication, and fused multiply-add—are implemented using algorithms that preserve accuracy through error compensation.
- The implementation uses Brook, a high-level language for GPU programming, to prototype and test the algorithms efficiently.
- The approach relies on the GPU's native single-precision arithmetic and texture memory for storing intermediate results.
- The algorithms are designed to minimize instruction-level overhead and exploit the GPU’s data-level parallelism.
- A custom testing framework generates random test vectors and compares results against MPFR for accuracy validation.
Experimental results
Research questions
- RQ1Can a software-level float-float representation achieve 44-bit precision on GPUs that only natively support 23-bit mantissa single-precision floats?
- RQ2How does the performance of float-float operations on GPUs compare to equivalent operations on CPUs, especially for large data sets?
- RQ3What is the actual accuracy of the float-float implementation, and how does it deviate from theoretical expectations?
- RQ4Why do certain operations, such as Add22, exhibit higher error than expected, and can this be attributed to hardware-specific behaviors?
- RQ5Can the float-float approach be efficiently optimized in low-level GPU languages like Cg or OpenGL for better performance?
Key findings
- The float-float implementation achieved a maximum observed error of -48.0 ULP for Add12, slightly higher than the theoretically expected exact result, indicating potential hardware-specific rounding anomalies.
- The Mul12 operation was found to be exact, consistent with theoretical expectations for the chosen representation and algorithm.
- Add22 and Mul22 operations showed higher errors (-33.7 and -45.0 ULP, respectively), primarily due to algorithmic complexity and edge cases in operand interaction.
- GPU execution times for basic float-float operations (add, mul, mad) were nearly identical, suggesting efficient instruction scheduling and merging by GPU drivers.
- The Add22 and Mul22 operations took approximately twice as long as basic operations, indicating higher computational cost due to internal algorithmic checks.
- The performance gap between GPU and CPU was substantial: GPU outperformed CPU by a factor of 25 for GPU workloads and 3000 for CPU workloads, highlighting GPU efficiency for large-scale data processing.
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.