Skip to content
Conference

The Einstein Engine: A Modular Code Generator for GPU Simulations in the Modern Era

Sep 2026 · eScience · pp. 67-78 · 0 citations · 67 references

Abstract

Implementing code that fully exploits modern GPU hardware is challenging. For scientific applications of sufficient complexity, this demands an in-depth understanding of hardware specifics, optimization techniques, and one or several domain-specific, idiosyncratic frameworks. We present the Einstein Engine, a modular scientific code generation system with powerful capabilities for exploring optimization spaces, built on a three-phase architecture inspired by modern compilers such as LLVM. Each phase can be developed and extended independently, empowering scientists to implement new domain-specific input formats or framework-tailored code generation targets while automatically benefiting from the intermediate optimization layer. To demonstrate the Einstein Engine’s effectiveness, we have implemented a full pipeline tailored for general relativity that transforms an approachable, high-level simulation description into highly optimized, efficient C++ code for GPUs. With this pipeline we created Cottonmouth, a suite of codes for solving Einstein’s field equations that has been incorporated into the 2026 Einstein Toolkit release. Across five platforms spanning NVIDIA and AMD GPUs, Cottonmouth matches the accuracy of well-established codes while evaluating its core kernels up to 6 times faster.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.