vix.ing · top · new · best · stats

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

2024/12/10 by Semih Kacmaz, Roland Haas, Kacmaz, Semih +3
Physics and Astronomy · #Artificial Intelligence (cs.AI) #Computational Physics (physics.comp-ph) #FOS: Computer and information sciences #FOS: Physical sciences #General Relativity and Quantum Cosmology (gr-qc) #I.2 #Instrumentation and Methods for Astrophysics (astro-ph.IM) #J.2 #Model Reduction and Neural Networks

paper · pdf · doi:10.48550/arxiv.2412.07836

openalex publication_date 2024/12/10 · openalex created_date 2024/12/13 · openalex updated_date 2026/07/28

Abstract

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 L1 and L_∞ errors of 4.54 × 10-7 and 3.44 × 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.

Related