Exploiting ray tracing technology through OptiX to compute particle interactions with cutoff in a 3D environment on GPU
Algis David, Bérenger Bramas
TL;DR
This work investigates using GPU ray tracing, via OptiX, to compute short-range particle interactions with a cutoff in 3D space, aiming to bypass grids or kd-trees. It introduces three geometric representations—Spherical, Double Squares, and Custom AABB—to cast rays and detect neighbor particles within a cutoff, computing interactions only for those within distance $C$. The study compares these OptiX-based approaches against a classical CUDA grid method across uniform and non-uniform distributions on two GPUs, showing that Custom AABB and triangle-based OptiX methods can outperform in sparse scenarios and that hardware and IS optimizations will increasingly determine practical effectiveness. The findings suggest that ray-tracing-based neighbor search, augmented by tailored IS and geometric strategies, holds promise for future high-performance simulations as GPU architectures evolve. The work provides a foundation for further refinement and broader hardware testing, with potential applicability to large-scale particle-based simulations as RT-core capabilities mature, and includes concrete algorithms for converting particle positions to geometric primitives and for generating particles on a sphere.
Abstract
Computing on graphics processing units (GPUs) has become standard in scientific computing, allowing for incredible performance gains over classical CPUs for many computational methods. As GPUs were originally designed for 3D rendering, they still have several features for that purpose that are not used in scientific computing. Among them, ray tracing is a powerful technology used to render 3D scenes. In this paper, we propose exploiting ray tracing technology to compute particle interactions with a cutoff distance in a 3D environment. We describe algorithmic tricks and geometric patterns to find the interaction lists for each particle. This approach allows us to compute interactions with quasi-linear complexity in the number of particles without building a grid of cells or an explicit kd-tree. We compare the performance of our approach with a classical approach based on a grid of cells and show that, currently, ours is slower in most cases but could pave the way for future methods.
