  The challenge to fully exploit the potential of existing and upcoming
scientific instruments like large single-dish radio telescopes is to process
the collected massive data effectively and efficiently. As a "quasi 2D stencil
computation" with the "Moore neighborhood pattern," gridding is the most
computationally intensive step in data reduction pipeline for radio astronomy
studies, enabling astronomers to create correct sky images for further
analysis. However, the existing gridding frameworks can either only run on
multi-core CPU architecture or do not support high-concurrency, multi-channel
data gridding. Their performance is then limited, and there are emerging needs
for innovative gridding frameworks to process data from large single-dish radio
telescopes like the Five-hundred-meter Aperture Spherical Telescope (FAST). To
address those challenges, we developed a High Efficient Gridding framework,
HEGrid, by overcoming the above limitations. Specifically, we propose and
construct the gridding pipeline in heterogeneous computing environments and
achieve multi-pipeline concurrency for high performance multi-channel
processing. Furthermore, we propose pipeline-based co-optimization to alleviate
the potential negative performance impact of possible intra- and inter-pipeline
low computation and I/O utilization, including component share-based redundancy
elimination, thread-level data reuse and overlapping I/O and computation. Our
experiments are based on both simulated datasets and actual FAST observational
datasets. The results show that HEGrid outperforms other state-of-the-art
gridding frameworks by up to 5.5x and has robust hardware portability,
including AMD Radeon Instinct GPU and NVIDIA GPU.
