加速消费级显卡上的 GENGA N体积分器
Speeding up the GENGA N-body integrator on consumer-grade graphics cards
AI总结:
针对消费级GPU双精度性能受限问题,修改N体积分器GENGA使其以单精度计算长程力,在精度损失极小的情况下将模拟速度提升数倍并降低能耗。
摘要:
GPU计算因单卡的计算潜力而广受欢迎。N体积分器 GENGA 专为此而构建,但由于消费级 GPU 截断的双精度(FP64)性能,它在这些显卡上存在性能损失。我们旨在通过利用消费级显卡较高的单精度(FP32)性能来加速 GENGA。我们修改了 GENGA,使其能够以 FP32 精度计算天体间的长程力,并通过5项实验进行了测试。我们分别在 FP32 和 FP64 精度下,对6600颗星子的相似初始条件进行了模拟。我们还运行了以下模拟:i) 以星子和行星胚胎的混合体为起始;ii) 星子驱动的巨行星迁移;iii) 带有气盘的类地行星形成。其次,我们在多种消费级和 Tesla GPU 上,分别使用 FP32 和 FP64 精度力,对以40000颗星子为起始的相同模拟进行了运行,以衡量 FP32 计算带来的性能提升。在 FP32 或 FP64 精度下运行时,不存在可归因于力设定而非随机效应的统计差异。使用两种精度时,能量的不确定性几乎相同。然而,使用 FP32 而非 FP64 精度的长程力时,角动量的不确定性大约高出两个数量级,但仍处于非常低的水平。在消费级显卡上以单精度运行模拟可将运行时间缩短至原来的三分之一,并与 Tesla A100 GPU 的运行时间差距缩小至三倍以内。额外的调优使所有类型显卡的模拟速度提升了一倍。在使用消费级 GPU 时,GENGA 中以单精度计算长程力的选项大幅提升了性能,而对精度的损失微乎其微。此外,这还带来了额外的环保效益,因为它减少了能源消耗。
英文摘要:
GPU computing is popular due to the calculation potential of a single card. The N-body integrator GENGA is built to for this, but it suffers a performance penalty on consumer-grade GPUs due to their truncated double precision (FP64) performance. We aim to speed up GENGA on consumer-grade cards by harvesting their high single-precision performance (FP32). We modified GENGA to be able to compute the long-distance forces between bodies in FP32 precision and tested this with 5 experiments. We ran simulations with similar initial conditions of 6600 planetesimals in both FP32 and FP64 precision. We also ran simulations that i) began with a mixture of planetesimals and planetary embryos, ii) planetesimal-driven giant planet migration, and iii) terrestrial planet formation with a gas disc. Second, we ran the same simulation beginning with 40 000 planetesimals using both FP32 and FP64 precision forces on a variety of consumer-grade and Tesla GPUs to measure the performance boost of FP32 computing. There are no statistical differences when running in FP32 or FP64 precision that can be attributed to the force prescription rather than stochastic effects. The uncertainties in energy are almost identical when using both precisions. However, the uncertainty in the angular momentum using FP32 rather than FP64 precision long-range forces is about two orders of magnitude greater, but still very low. Running the simulations in single precision on consumer-grade cards decreases running time by a factor of three and becomes within a factor of three of a Tesla A100 GPU. Additional tuning speeds up the simulation by a factor of two across all types of cards. The option to compute the long-range forces in single precision in GENGA when using consumer-grade GPUs dramatically improves performance at a little penalty to accuracy. There is an additional environmental benefit because it reduces energy usage.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。