Ranging from NVIDIA GPUs to AMD GPUs and Intel GPUs: Given the heterogeneity of available accelerator cards within current supercomputers, portability is a key aspect for modern HPC applications. In Octo-Tiger, we rely on Kokkos and its various execution spaces for portable compute kernels. In turn, we use HPX to coordinate kernel launches, CPU tasks, and communication. This combination allows us to have a fine interleaving between portable CPU/GPU computations and communication, enabling scalability on various supercomputers. However, for HPX and Kokkos to work together optimally, we need to be able to treat Kokkos kernels as HPX tasks. Otherwise, instead of integrating asynchronous Kokkos kernel launches into HPX's task graph, we would have to actively wait for them with fence commands, which wastes CPU time better spent otherwise. Using an integration layer called HPX-Kokkos, treating Kokkos kernels as tasks already works for some Kokkos execution spaces (like the CUDA one), but not for others (like the SYCL one). In this work, we started making Octo-Tiger and HPX itself compatible with SYCL. To do so, we introduce numerous software changes, most notably an HPX-SYCL integration. This integration allows us to treat SYCL events as HPX tasks, which in turn allows us to better integrate Kokkos by extending the support of HPX-Kokkos to also fully support Kokkos' SYCL execution space. We show two ways to implement this HPX-SYCL integration and test them using Octo-Tiger and its Kokkos kernels, on both an NVIDIA A100 and an AMD MI100. We find modest, yet noticeable, speedups by enabling this integration, even when just running simple single-node scenarios with Octo-Tiger where communication and CPU utilization are not yet an issue.
翻译:从NVIDIA GPU到AMD GPU再到Intel GPU:鉴于当前超级计算机中可用加速器卡的异构性,可移植性是现代高性能计算应用的关键。在Octo-Tiger中,我们依赖Kokkos及其多种执行空间来实现可移植的计算内核,同时使用HPX协调内核启动、CPU任务和通信。这种组合使我们能够精细交错可移植的CPU/GPU计算与通信,从而在各类超级计算机上实现可扩展性。然而,要使HPX与Kokkos最佳协同工作,我们需要能够将Kokkos内核视为HPX任务。否则,不仅无法将异步的Kokkos内核启动集成到HPX的任务图中,还需通过栅栏指令主动等待这些内核,导致原本可更充分利用的CPU时间被浪费。借助名为HPX-Kokkos的集成层,将Kokkos作为任务处理已在部分Kokkos执行空间(如CUDA环境)中实现,但在其他空间(如SYCL环境)中尚不可行。本工作中,我们开始使Octo-Tiger及HPX自身兼容SYCL。为此,我们引入多项软件改进,其中最重要的是HPX-SYCL集成。该集成允许我们将SYCL事件视为HPX任务,进而通过扩展HPX-Kokkos的支持范围,使其全面支持Kokkos的SYCL执行空间,从而更好地集成Kokkos。我们展示了两种实现HPX-SYCL集成的方法,并分别在NVIDIA A100和AMD MI100上使用Octo-Tiger及其Kokkos内核进行测试。结果表明,即使在通信与CPU利用率尚未成为瓶颈的简单单节点场景下,该集成也能带来虽小但显著的加速。