CodeJeNN: A simple C++ neural network generator for physics applications
- URL: http://arxiv.org/abs/2607.02746v1
- Date: Thu, 02 Jul 2026 20:30:40 GMT
- Title: CodeJeNN: A simple C++ neural network generator for physics applications
- Abstract summary: Machine learning has shown speedups for numerical methods in physics applications, but integrating Python-based libraries into high-performance C++ solvers creates performance bottlenecks.<n>We present CodeJeNN, which bridges this gap by auto-generating self-contained C++ code from trained Keras models for inference.
- Score: 1.1599040452563385
- License: http://creativecommons.org/publicdomain/zero/1.0/
- Abstract: Machine learning has shown speedups for numerical methods in physics applications, but integrating Python-based libraries into high-performance C++ solvers creates performance bottlenecks. We present CodeJeNN, which bridges this gap by auto-generating self-contained C++ code from trained Keras models for inference. This eliminates external dependencies through minimal inlined functions, allowing seamless integration into existing frameworks. We describe the Keras-to-C++ workflow, supported architectures, and limitations. CodeJeNN is demonstrated through inference benchmarks against Keras in eager and JIT modes and a CFD test case modeling viscosity in a hydrogen-air mixing layer, showing speedups without sacrificing accuracy.
Related papers
- TorchKM: A GPU-Oriented Library for Kernel Learning and Model Selection [10.963977296401582]
TorchKM is an open-source library for kernel machines, including support vector machines, kernel logistic regression, and kernel quantile regression.<n>The library features a scikit-learn-style API and is designed to exploit GPU-friendly linear algebra.<n>Code and documentation are available at https://github.com/YikaiZhang95/torchkm, and the package can be easily installed via PyPI.
arXiv Detail & Related papers (2026-06-04T21:56:21Z) - AutoVecCoder: Teaching LLMs to Generate Explicitly Vectorized Code [69.84692701646769]
AutoVecCoder is a novel framework designed to empower Large Language Models with the capability of automated explicit vectorization.<n>VecPrompt, an automated data synthesis pipeline, injects domain-specific intrinsic knowledge.<n>VecRL, a reinforcement learning framework, aligns code generation with execution efficiency.<n>AutoVecCoder-8B trained by this framework achieves state-of-the-art performance on the SSE and AVX subsets of SimdBench.
arXiv Detail & Related papers (2026-05-18T07:33:15Z) - Python Bindings for a Large C++ Robotics Library: The Case of OMPL [12.900006436558405]
Python bindings are a critical bridge between high-performance C++ libraries and the flexibility of Python.<n> generating bindings for larges is a tedious process that creates a heavy burden for a small group of maintainers.<n>In this work, we investigate the use of Large Language Models (LLMs) to assist in generating nanobind wrappers.
arXiv Detail & Related papers (2026-03-04T23:18:10Z) - No Saved Kaleidosope: an 100% Jitted Neural Network Coding Language with Pythonic Syntax [0.8408735228878615]
We developed a jitted compiler for training Artificial Neural Networks using C++, LLVM and Cuda.
It features object-oriented characteristics, strong typing, parallel workers for data pre-processing, pythonic syntax for expressions, PyTorch like model declaration and Automatic Differentiation.
arXiv Detail & Related papers (2024-09-17T23:15:39Z) - CUAOA: A Novel CUDA-Accelerated Simulation Framework for the QAOA [3.757262277494307]
Quantum Approximate Optimization Algorithm (QAOA) is a prominent quantum algorithm designed to find approximate solutions to optimization problems.<n>Existing state-of-the-art simulation frameworks suffer from long execution times or lack comprehensive functionality.<n>We develop a GPU accelerated QAOA simulation framework utilizing the runtime-the-art toolkit.
arXiv Detail & Related papers (2024-07-17T21:06:18Z) - Extending Python for Quantum-Classical Computing via Quantum
Just-in-Time Compilation [78.8942067357231]
Python is a popular programming language known for its flexibility, usability, readability, and focus on developer productivity.
We present a language extension to Python that enables heterogeneous quantum-classical computing via a robust C++ infrastructure for quantum just-in-time compilation.
arXiv Detail & Related papers (2021-05-10T21:11:21Z) - Self Normalizing Flows [65.73510214694987]
We propose a flexible framework for training normalizing flows by replacing expensive terms in the gradient by learned approximate inverses at each layer.
This reduces the computational complexity of each layer's exact update from $mathcalO(D3)$ to $mathcalO(D2)$.
We show experimentally that such models are remarkably stable and optimize to similar data likelihood values as their exact gradient counterparts.
arXiv Detail & Related papers (2020-11-14T09:51:51Z) - Extending C++ for Heterogeneous Quantum-Classical Computing [56.782064931823015]
qcor is a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context.
Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language manner.
arXiv Detail & Related papers (2020-10-08T12:49:07Z) - PolyDL: Polyhedral Optimizations for Creation of High Performance DL
primitives [55.79741270235602]
We present compiler algorithms to automatically generate high performance implementations of Deep Learning primitives.
We develop novel data reuse analysis algorithms using the polyhedral model.
We also show that such a hybrid compiler plus a minimal library-use approach results in state-of-the-art performance.
arXiv Detail & Related papers (2020-06-02T06:44:09Z) - MPLP++: Fast, Parallel Dual Block-Coordinate Ascent for Dense Graphical
Models [96.1052289276254]
This work introduces a new MAP-solver, based on the popular Dual Block-Coordinate Ascent principle.
Surprisingly, by making a small change to the low-performing solver, we derive the new solver MPLP++ that significantly outperforms all existing solvers by a large margin.
arXiv Detail & Related papers (2020-04-16T16:20:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.