Meeting both scalability and performance portability requirements is a challenge for any HPC application, especially for adaptively refined ones. In Octo-Tiger, an astrophysics application for the simulation of stellar mergers, we approach this with existing solutions: We employ HPX to obtain fine-grained tasks to easily distribute work and finely overlap communication and computation. For the computations themselves, we use Kokkos to turn these tasks into compute kernels capable of running on hardware ranging from a few CPU cores to powerful accelerators. There is a missing link, however: while the fine-grained parallelism exposed by HPX is useful for scalability, it can hinder GPU performance when the tasks become too small to saturate the device, causing low resource utilization. To bridge this gap, we investigate multiple different GPU work aggregation strategies within Octo-Tiger, adding one new strategy, and evaluate the node-level performance impact on recent AMD and NVIDIA GPUs, achieving noticeable speedups.
翻译:满足可扩展性和性能可移植性要求对任何HPC应用都是一项挑战,尤其是自适应网格细化应用。在用于模拟恒星合并的天体物理学应用Octo-Tiger中,我们通过现有方案解决这一问题:我们采用HPX获得细粒度任务,以轻松分布工作并精细重叠通信与计算。对于计算本身,我们使用Kokkos将这些任务转化为能够在从少量CPU核心到强大加速器的硬件上运行的计算内核。然而,这里存在一个缺失环节:虽然HPX提供的细粒度并行性有利于可扩展性,但当任务变得过小无法饱和设备时,它会阻碍GPU性能,导致资源利用率低下。为弥合这一差距,我们在Octo-Tiger中研究了多种不同的GPU工作聚合策略,并新增一种策略,评估了在最新AMD和NVIDIA GPU上的节点级性能影响,实现了显著加速。