arXiv:2609.06680physics.comp-phSep 2026

Manuscript Offprint

arXiv:2609.06680

A HIP-Compatible Accelerator Backend for Fourier-Bessel Particle-in-Cell Simulations on CPU/DCU Heterogeneous Clusters

Jingliang Fan, Ruiqing He, Yang Wan, Jiandong Shang, Hengliang Guo, Qiang Chen

Abstract

FBPIC (Fourier-Bessel particle-in-cell) is a high-performance simulation code for relativistic plasma and accelerator physics. Its original accelerator backend relies on Numba CUDA, which limits its direct deployment on accelerators using the HIP (Heterogeneous-Compute Interface for Portability) programming environment, such as DCU (Deep Computing Unit) accelerators. In this work, we develop an accelerator backend compatible with HIP that enables FBPIC to run efficiently on DCU platforms while preserving its Python user interface and high level simulation workflow. For the evaluated LWFA (laser-wakefield acceleration) workloads, the proposed backend achieves 1.32-1.54× speedups over the original FBPIC implementation on an NVIDIA V100 GPU and enables efficient execution on the DCU platform. We also summarize the key lessons learned from porting FBPIC to the DCU platform. Multi-DCU experiments achieve a 1.88× strong-scaling speedup on four accelerators and a 2.72× increase in aggregate throughput at approximately 68% weak-scaling efficiency, with communication analysis identifying inter-node communication and synchronization as the main scalability limitations. Beyond FBPIC, the proposed approach provides a practical reference for porting and optimizing other scientific computing applications developed with Python on heterogeneous accelerator platforms.

Keywords: Fourier-Bessel particle-in-cell, HIP, CuPy, DCU, Performance portability

1. Introduction

The PIC (Particle-In-Cell) method has been widely used for plasma physics, accelerator physics, and laser-plasma interaction simulations[1, 2, 3]. These problems involve electromagnetic structures and charged particles evolving over multiple spatial and temporal scales, and their predictive accuracy is often limited by both numerical dispersion and computational cost. As plasma-accelerator studies move toward larger domains, longer propagation distances, and more extensive parameter scans, accelerator computing has become increasingly important for high-fidelity PIC simulations[3, 4]. The DCU (Deep Computing Unit) is a GPU-like accelerator for high-performance heterogeneous computing and supports the HIP (Heterogeneous-computing Interface for Portability) programming model[5]. Its CUDA-like programming interface provides a practical environment for porting GPU-accelerated scientific applications[6, 7]. With the emergence of such accelerator platforms, improving the performance portability of high-fidelity PIC codes becomes increasingly important. FBPIC (Fourier-Bessel Particle-In-Cell) is a Particle-In-Cell code designed for relativistic plasma simulations, with particular relevance to laser-wakefield and plasma-wakefield acceleration problems[8]. By representing the electromagnetic fields in a quasi-cylindrical spectral basis, FBPIC can retain essential three-dimensional physical effects for nearly axisymmetric systems while requiring far fewer degrees of freedom than a full three-dimensional Cartesian PIC simulation[8]. The Fourier-Bessel spectral formulation also avoids the numerical dispersion associated with conventional finite-difference time-domain PIC solvers, which is particularly important for simulations involving ultra-relativistic beams and laser pulses[8, 9].

The original FBPIC implementation is written in Python and relies on Numba just-in-time compilation for its CPU and CUDA GPU execution paths. Its GPU support requires both CuPy and Numba-related GPU dependencies[10, 11, 12]. This design provides a productive high-level programming model and good performance on NVIDIA GPUs, but it also tightly couples the performance-critical kernels to the CUDA-oriented Numba backend. This becomes a major limitation when targeting DCU/HIP platforms, because Numba's ROCm target has been officially unmaintained since version 0.54.0[13]. As a result, the original Numba-based GPU path cannot be directly reused as a robust and efficient backend for DCU systems.

To overcome this portability limitation, we develop a HIP-compatible accelerator backend for FBPIC that removes the dependence on Numba from its performance-critical GPU execution path. Instead of translating Python-defined kernels

∗^{*}Corresponding author Email address: qiangchen@zzu.edu.cn (Qiang Chen) through the Numba JIT infrastructure, the dominant PIC kernels are reimplemented as explicit C/C++ GPU kernels and integrated into the existing Python framework through CuPy RawKernel[14]. CuPy provides CUDA- and ROCm-backed execution environments, allowing the same Python-side dispatch mechanism to be retained across NVIDIA GPUs and HIP-compatible accelerators[12, 15]. In addition, particle and field data remain resident in CuPy device arrays throughout the time-stepping loop, so the backend can be replaced without introducing additional host-device data movement or modifying the high-level simulation workflow. The existing MPI-based longitudinal domain decomposition is preserved, so the proposed backend changes only the intra-device execution layer rather than the physical model or distributed-memory decomposition of FBPIC.

The main contributions of this work are summarized as follows:

A portable accelerator backend for FBPIC. We develop a HIP-compatible accelerator backend for FBPIC by replacing its performance-critical Numba CUDA kernels with explicitly implemented C/C++ GPU kernels. These kernels are integrated into the existing Python framework through CuPy RawKernel, preserving the original user interface, simulation workflow, device-resident data model, and MPI-based domain decomposition.

Kernel-level optimization for DCU execution. We optimize the rewritten kernels for DCU execution through compiler- and occupancy-oriented techniques, including pointer-based memory access, selective loop unrolling, register-pressure control, and kernel-specific thread-block tuning, and investigate the performance trade-offs associated with particle locality and binning.

Cross-platform numerical and performance evaluation. We verify the numerical consistency of the backend using linear-wakefield and LWFA (laser-wakefield acceleration) benchmarks and demonstrate performance portability across CUDA and HIP platforms. On an NVIDIA V100 GPU, the rewritten implementation achieves 1.32-1.54× speedups over the original FBPIC implementation for the evaluated workloads.

Multi-DCU scalability and communication analysis. We characterize the multi-DCU scalability of FBPIC through strong- and weak-scaling experiments and mpiP communication profiling. The implementation achieves a 1.88× strong-scaling speedup on four DCUs and a 2.72× increase in aggregate throughput at approximately 68% weak-scaling efficiency, while the profiling results identify inter-node communication and synchronization as the primary limitations at larger process counts.

References (24)