Bits missing: Finding exotic pulsars using bfloat16 on NVIDIA GPUs

Jack White, Karel Adámek, Jayanta Roy, Sofia Dimoudi, S. M. Ransom, Wesley Armour

Abstract

The Fourier Domain Acceleration Search (FDAS) is an effective technique for detecting faint binary pulsars in large radio astronomy datasets. This paper quantifies the sensitivity impact of reducing numerical precision in the GPU accelerated FDAS pipeline of the AstroAccelerate software package. The prior implementation used IEEE-754 single-precision in the entire binary pulsar detection pipeline, spending a large fraction of the runtime computing GPU accelerated FFTs. AstroAccelerate has been modified to use bfloat16 (and IEEE754 double-precision to provide a "gold standard" comparison) within the Fourier domain convolution section of the FDAS routine. Approximately 20,000 synthetic pulsar filterbank files representing binary pulsars were generated using SIGPROC with a range of physical parameters. They have been processed using bfloat16, single and double-precision convolutions. All bfloat16 peaks are within 3% of the predicted signal-to-noise ratio of their corresponding single-precision peaks. Of 14,971 "bright" single-precision fundamental peaks above a power of 44.982 (our experimentally measured highest noise value), 14,602 (97.53%) have a peak in the same acceleration and frequency bin in the bfloat16 output plane, whilst in the remaining 369 the nearest peak is located in the adjacent acceleration bin. There is no bin drift measured between the single and double-precision results. The bfloat16 version of FDAS achieves a speedup of approximately 1.6x compared to single-precision. A comparison between AstroAccelerate and the PRESTO software package is presented using observations collected with the GMRT of PSR J1544+4937, a 2.16ms black widow pulsar in a 2.8 hour compact orbit.

Introduction

Searching for binary pulsars—pulsars in orbit with another object—is a computational challenge of increasing scale. As these stars orbit, their signals are Doppler-shifted, causing the pulse period to "drift" over time. To detect them, astronomers employ the Fourier Domain Acceleration Search (FDAS), which involves convolving the signal with thousands of templates representing different possible accelerations.

The challenge lies in the sheer volume of data. Next-generation telescopes like the Square Kilometre Array (SKA) are expected to produce data at rates of 800 GB/s. Storing this for later analysis is unfeasible; real-time processing is required. Current pipelines using standard IEEE-754 single-precision (FP32) math are often too slow or hardware-intensive to keep up with this "data deluge."

Methods

The authors modified the AstroAccelerate software package to utilize bfloat16 (Brain Floating Point) for the most demanding part of the FDAS pipeline: the Fourier domain convolutions. Standard 16-bit "half-precision" (FP16) is often unsuitable for scientific computing because its narrow dynamic range leads to frequent overflows during Fast Fourier Transforms (FFTs). However, bfloat16 is a "truncated" version of FP32; it keeps the same 8-bit exponent (maintaining the same dynamic range) but reduces the mantissa (precision) from 23 bits to 7 bits.

Comparison of FP32, bfloat16, and IEEE-754 half-precision bit formats.

The team implemented a mixed-precision pipeline where the initial "Real FFT" is kept in FP32 to preserve signal integrity. The heavy lifting—complex multiplications and Inverse FFTs—is performed in bfloat16. The results are "quick-cast" back to FP32 by simply appending 16 zeros to the bitstring, avoiding expensive GPU kernel overhead.

The modified AstroAccelerate FDAS pipeline using mixed precision.

Results

The study evaluated the pipeline using approximately 20,000 synthetic pulsar filterbank files and real-world observations of PSR J1544+4937 from the Giant Metrewave Radio Telescope (GMRT).

  • Speedup: The bfloat16 implementation achieved a 1.6x speedup compared to the standard FP32 version.
  • Sensitivity: All bfloat16 peaks were within 3% of the predicted signal-to-noise ratio (SNR) of the FP32 "gold standard."
  • Positional Accuracy: For "bright" signals, 97.53% of detections stayed in the exact same frequency/acceleration bin. The remaining 2.47% only drifted by a single adjacent bin.
  • Real-World Validation: When tested on GMRT data, the bfloat16 pipeline successfully detected the black widow pulsar with values nearly identical to high-precision results and the industry-standard PRESTO software.

Discussion

The results demonstrate that in pulsar searching, dynamic range is more critical than high precision. This is why bfloat16 succeeded where standard FP16 would likely fail due to overflows. The authors found that "extreme" errors in detection (bin drifts) only occurred when the signal was already buried in the noise. If a signal is strong enough to be detected, the reduced precision of bfloat16 almost never moves it to the wrong search bin.

The "zero-cost casting" between bfloat16 and FP32 is a significant advantage. Because bfloat16 is essentially the upper half of an FP32 number, converting between them is a trivial bit-shifting operation. This allows the pipeline to drop into lower precision for the "math-heavy" parts and return to FP32 without a performance penalty.

Conclusion

While this paper focuses on FDAS (constant acceleration), many binary systems have changing acceleration, requiring a Jerk Search. The computational demands of Jerk Searches are even higher, making the 1.6x speedup from bfloat16 even more attractive for future implementations. Future work could investigate if even earlier stages of the pipeline can be moved to reduced precision without losing the "exotic" pulsars that are the primary targets of these surveys.

Summary updated

Abstract

The Fourier Domain Acceleration Search (FDAS) is an effective technique for detecting faint binary pulsars in large radio astronomy datasets. This paper quantifies the sensitivity impact of reducing numerical precision in the GPU accelerated FDAS pipeline of the AstroAccelerate software package. The prior implementation used IEEE-754 single-precision in the entire binary pulsar detection pipeline, spending a large fraction of the runtime computing GPU accelerated FFTs. AstroAccelerate has been modified to use bfloat16 (and IEEE754 double-precision to provide a "gold standard" comparison) within the Fourier domain convolution section of the FDAS routine. Approximately 20,000 synthetic pulsar filterbank files representing binary pulsars were generated using SIGPROC with a range of physical parameters. They have been processed using bfloat16, single and double-precision convolutions. All bfloat16 peaks are within 3% of the predicted signal-to-noise ratio of their corresponding single-precision peaks. Of 14,971 "bright" single-precision fundamental peaks above a power of 44.982 (our experimentally measured highest noise value), 14,602 (97.53%) have a peak in the same acceleration and frequency bin in the bfloat16 output plane, whilst in the remaining 369 the nearest peak is located in the adjacent acceleration bin. There is no bin drift measured between the single and double-precision results. The bfloat16 version of FDAS achieves a speedup of approximately 1.6x compared to single-precision. A comparison between AstroAccelerate and the PRESTO software package is presented using observations collected with the GMRT of PSR J1544+4937, a 2.16ms black widow pulsar in a 2.8 hour compact orbit.
BibTeX
@article{white2023bits,
  author = {Jack White and Karel Adámek and Jayanta Roy and Sofia Dimoudi and S. M. Ransom and Wesley Armour},
  title = {{Bits missing: Finding exotic pulsars using bfloat16 on NVIDIA GPUs}},
  journal = {The Astrophysical Journal Supplement Series},
  year = {2023},
  doi = {10.3847/1538-4365/acb351},
}
Figure