RoseNNa: A performant, portable library for neural network inference with application to computational fluid dynamics
Ajay Bati, Spencer H. Bryngelson

TL;DR
RoseNNa is a lightweight, high-performance library that seamlessly integrates neural network inference into CFD solvers written in C/C++ or Fortran, significantly outperforming existing frameworks for small neural networks.
Contribution
The paper introduces RoseNNa, a portable library that converts trained neural networks into high-performance Fortran code, bridging the gap between machine learning and CFD programming environments.
Findings
RoseNNa outperforms PyTorch and libtorch on small neural networks.
Speedups of 10x for smaller networks and 2x for larger networks.
Efficient integration with CFD solvers in C/C++ and Fortran.
Abstract
The rise of neural network-based machine learning ushered in high-level libraries, including TensorFlow and PyTorch, to support their functionality. Computational fluid dynamics (CFD) researchers have benefited from this trend and produced powerful neural networks that promise shorter simulation times. For example, multilayer perceptrons (MLPs) and Long Short Term Memory (LSTM) recurrent-based (RNN) architectures can represent sub-grid physical effects, like turbulence. Implementing neural networks in CFD solvers is challenging because the programming languages used for machine learning and CFD are mostly non-overlapping, We present the roseNNa library, which bridges the gap between neural network inference and CFD. RoseNNa is a non-invasive, lightweight (1000 lines), and performant tool for neural network inference, with focus on the smaller networks used to augment PDE solvers, like…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · Model Reduction and Neural Networks · Explainable Artificial Intelligence (XAI)
MethodsLib · Sigmoid Activation · Tanh Activation · Long Short-Term Memory · Focus
