[Paper Review] Ebb: A DSL for Physical Simulation on CPUs and GPUs
Ebb is a domain-specific language (DSL) for physical simulation that uses a three-layer architecture to separate application logic, geometric domain libraries, and low-level runtime abstractions based on relations. It enables high-performance simulation on both CPUs and GPUs by compiling to efficient parallel code, achieving within 27% of hand-tuned GPU code and up to 9× better performance than optimized CPU code when GPU alternatives are unavailable.
Designing programming environments for physical simulation is challenging because simulations rely on diverse algorithms and geometric domains. These challenges are compounded when we try to run efficiently on heterogeneous parallel architectures. We present Ebb, a domain-specific language (DSL) for simulation, that runs efficiently on both CPUs and GPUs. Unlike previous DSLs, Ebb uses a three-layer architecture to separate (1) simulation code, (2) definition of data structures for geometric domains, and (3) runtimes supporting parallel architectures. Different geometric domains are implemented as libraries that use a common, unified, relational data model. By structuring the simulation framework in this way, programmers implementing simulations can focus on the physics and algorithms for each simulation without worrying about their implementation on parallel computers. Because the geometric domain libraries are all implemented using a common runtime based on relations, new geometric domains can be added as needed, without specifying the details of memory management, mapping to different parallel architectures, or having to expand the runtime's interface. We evaluate Ebb by comparing it to several widely used simulations, demonstrating comparable performance to hand-written GPU code where available, and surpassing existing CPU performance optimizations by up to 9$ imes$ when no GPU code exists.
Motivation & Objective
- To address the challenge of building efficient, portable simulation code that runs on heterogeneous architectures like CPUs and GPUs.
- To unify diverse geometric domains—such as grids, meshes, and particles—under a common abstraction to simplify simulation development.
- To reduce the expertise barrier in simulation by allowing physicists and engineers to focus on algorithms and physics, not low-level parallel programming.
- To enable extensibility by allowing new geometric domains to be added without modifying the runtime or language.
- To support composition of multiple physical phenomena across different domains through a shared relational interface.
Proposed method
- Ebb employs a three-layer architecture: application code written in Ebb, domain-specific libraries built on a relational data model, and a low-level runtime targeting CPUs and GPUs.
- Geometric domains such as regular grids, tetrahedral meshes, and particle systems are implemented as libraries using a unified relational API, abstracting low-level memory and execution details.
- The relational model stores data in column-oriented format, enabling efficient parallel access and optimization across different architectures.
- The Ebb runtime compiles Ebb code into optimized kernels for CPUs and GPUs, dynamically scheduling execution and managing memory layout.
- The system supports dynamic compilation and recompilation to enable auto-tuning of data layouts and kernel execution strategies.
- It allows integration with external libraries for unsupported features like Fourier transforms or collision detection, ensuring extensibility.
Experimental results
Research questions
- RQ1How can a DSL for physical simulation efficiently target both CPUs and GPUs without sacrificing performance?
- RQ2Can a unified relational data model effectively abstract diverse geometric domains like grids, meshes, and particles in simulation?
- RQ3How can a DSL support the composition of multiple physical phenomena across different geometric domains?
- RQ4To what extent can a high-level DSL achieve performance comparable to hand-optimized GPU code?
- RQ5How can the system be extended to support dynamic operations like particle insertion or adaptive remeshing?
Key findings
- Ebb achieves performance within 27% of hand-tuned GPU code across multiple simulations, demonstrating strong portability and efficiency.
- When no GPU-optimized baseline existed, Ebb outperformed optimized CPU code by up to 9×, highlighting its effectiveness in CPU-only scenarios.
- The relational abstraction enables seamless interoperability between different geometric domains, such as tetrahedral meshes, unstructured grids, and particles, through a common API.
- The three-layer architecture successfully decouples application logic from low-level implementation, allowing application developers to focus on physics and algorithms.
- The system supports dynamic compilation and auto-tuning, enabling runtime optimization of data layout and kernel execution strategies.
- Ebb enables integration with external libraries for missing features like collision detection and Fourier transforms, ensuring extensibility beyond its core capabilities.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.