arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.07836gr-qcastro-ph.IMcs.AIphysics.comp-ph
收藏

机器学习驱动的混合分段多方与表格状态方程中守恒量到原始量转换

Machine learning-driven conservative-to-primitive conversion in hybrid piecewise polytropic and tabulated equations of state

Department of Physics, University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校物理系);National Center for Supercomputing Applications, University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校国家超级计算应用中心);Department of Physics and Astronomy, University of British Columbia(不列颠哥伦比亚大学物理与天文学系);Learning Division, Argonne National Laboratory(阿贡国家实验室学习部);Department of Computer Science, The University of Chicago(芝加哥大学计算机科学系)

Semih Kacmaz, Roland Haas, E. A. Huerta

AI总结:

本文提出用前馈神经网络结合 TensorRT GPU 优化与混合精度量化,加速混合分段多方与表格状态方程中的守恒量到原始量反演,实现比传统求根方法最高约 400 倍推理加速,并发布科学软件以支持进一步验证。

摘要:

我们提出一种新颖的机器学习(ML)方法,用于加速守恒量到原始量的反演,重点关注混合分段多方和表格状态方程。传统的求根技术在计算上代价高昂,特别是对于大规模相对论流体力学模拟而言。为解决这一问题,我们采用前馈神经网络(NNC2PS 和 NNC2PL),在 PyTorch 中训练,并使用 NVIDIA TensorRT 针对 GPU 推理进行优化,在精度损失极小的情况下实现了显著的加速。NNC2PS 模型的 $L_1$ 和 $L_\infty$ 误差分别为 $4.54 \times 10^{-7}$ 和 $3.44 \times 10^{-6}$,而 NNC2PL 模型表现出更低的误差值。与传统的求根方法相比,采用混合精度部署的 TensorRT 优化大幅提升了性能。具体而言,对于包含 1,000,000 个点的数据集,NNC2PS 的混合精度 TensorRT 引擎的推理速度比传统的单线程 CPU 实现快约 400 倍。在 Delta 超级计算机(双 AMD 64 核 2.45 GHz Milan 处理器;8 个 NVIDIA A100 GPU,配备 40 GB HBM2 RAM 和 NVLink)的整个计算节点上进行理想并行化,预测在处理 800 万个数据点时,TensorRT 相对于最优并行化数值方法可实现 25 倍的加速。此外,该 ML 方法随着数据集规模的增大表现出次线性扩展。我们发布了所开发的科学软件,以便进一步验证和扩展我们的发现。这项工作凸显了 ML 结合 GPU 优化和模型量化在相对论流体力学模拟中加速守恒量到原始量反演的潜力。

英文摘要:

We present a novel machine learning (ML) method to accelerate conservative-to-primitive inversion, focusing on hybrid piecewise polytropic and tabulated equations of state. Traditional root-finding techniques are computationally expensive, particularly for large-scale relativistic hydrodynamics simulations. To address this, we employ feedforward neural networks (NNC2PS and NNC2PL), trained in PyTorch and optimized for GPU inference using NVIDIA TensorRT, achieving significant speedups with minimal accuracy loss. The NNC2PS model achieves $ L_1 $ and $ L_\infty $ errors of $ 4.54 \times 10^{-7} $ and $ 3.44 \times 10^{-6} $, respectively, while the NNC2PL model exhibits even lower error values. TensorRT optimization with mixed-precision deployment substantially accelerates performance compared to traditional root-finding methods. Specifically, the mixed-precision TensorRT engine for NNC2PS achieves inference speeds approximately 400 times faster than a traditional single-threaded CPU implementation for a dataset size of 1,000,000 points. Ideal parallelization across an entire compute node in the Delta supercomputer (Dual AMD 64 core 2.45 GHz Milan processors; and 8 NVIDIA A100 GPUs with 40 GB HBM2 RAM and NVLink) predicts a 25-fold speedup for TensorRT over an optimally-parallelized numerical method when processing 8 million data points. Moreover, the ML method exhibits sub-linear scaling with increasing dataset sizes. We release the scientific software developed, enabling further validation and extension of our findings. This work underscores the potential of ML, combined with GPU optimization and model quantization, to accelerate conservative-to-primitive inversion in relativistic hydrodynamics simulations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑