# google/ever architecture

> Architecture diagram of the GitHub repository google/ever, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/google/ever
- Repository: https://github.com/google/ever

## Overview

##### Main Components
- Rendering Core: At the center is the rendering engine that implements the exact volumetric ellipsoid rendering. This appears in several places:
- The “integration_utils/gaussian_renderer” and similar modules (also in new_files) handle key aspects of the renderer.
- The “splinetracers” directory contains critical C++ and CUDA code (with CUDA kernels, shader files in ‘slang’, and build configurations) that accelerate the rendering process using GPU resources.
- Orchestration & Integration Layer:
- Python scripts (e.g., “eval_sh.py”, “host_render_server.py”, “partial_eval.py”) in the project’s root and integration_utils orchestrate the rendering pipeline.
- “jaxutil” indicates an integration with JAX for numerical routines which might be used in view synthesis or gradient computations.
- Demonstration & Experimentation:
- The “integration_utils/notebooks” and “new_files/notebooks” directories contain Jupyter notebooks for demonstration purposes (e.g., rendering animations, visualizing primitives or MLPs).
- Testing and Build Infrastructure:
- “run_unit_tests.sh” and the “tests” directory encapsulate the testing framework.
- Build configuration is managed by “CMakeLists.txt”, various CMake directories (including CMake/configure_slang.cmake inside the main project and in third_party), and “setup.py” for Python packaging.
- Third-party Dependencies & Utilities:
- The “third_party” folder includes additional CMake modules and integration code for CUDA, OptiX, and Torch, plus extra shader-related utilities.
- “utils” supplies additional math and testing utilities for internal computations.

- Data flow from the core to the Demonstration components (Jupyter Notebooks) in terms of output images or view synthesis results.
- Connections from Build/Configuration components (CMake, setup.py) to both the Rendering Core and testing modules, indicating dependency and build-time configurations.
- External dependencies (third_party libraries, CUDA, OptiX, Torch) as separate blocks interfaced with the core rendering and build configuration.

##### Architectural Patterns and Design Principles
- Modular Separation: The project is organized so that different directories represent distinct modules (e.g., new_files vs. integration_utils might represent experimental versions or alternative implementations).
- Hardware Acceleration: The “splinetracers” module emphasizes low-level GPU computing (CUDA kernels, shader files in slang) and is a separate micro-module, pointing to a layered design separating CPU orchestration from GPU heavy lifting.
- Reusability and Extensibility: The existence of utilities (utils and jaxutil) and clearly separated notebook demos hints at a design where core functionality is abstracted so that demonstration and evaluation codes can be built on top.

##### Technologies, Frameworks, and Libraries
- C++/CUDA: For performance-critical rendering (found in splinetracers).
- Slang: For shader programming used in the rendering pipeline.
- Python: For orchestration scripts, integration utilities, and demo notebooks.
- JAX: As evidenced by the jaxutil directory, potentially for numerical integration or gradient computation.
- External dependencies for GPU acceleration like CUDA, OptiX, and Torch (configured via third_party/CMake).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Orchestration & Integration Layer
    subgraph "Orchestration & Integration"
        O1["eval_sh.py"] 
        O2["integration_utils/host_render_server.py"]
        O3["new_files/host_render_server.py"]
        O4["integration_utils/partial_eval.py"]
        O5["new_files/partial_eval.py"]
    end

    %% Rendering Core
    subgraph "Rendering Core"
        R1["integration_utils/gaussian_renderer"]
        R2["new_files/gaussian_renderer"]
        R3["splinetracers – GPU Rendering Engine"]
    end

    %% JAX Utilities
    subgraph "JAX Utilities"
        J1["jaxutil"]
    end

    %% Demonstration & Experimentation
    subgraph "Demonstration & Experimentation"
        D1["integration_utils/notebooks"]
        D2["new_files/notebooks"]
    end

    %% Testing and Build Infrastructure
    subgraph "Testing & Build Infrastructure"
        T1["tests"]
        T2["run_unit_tests.sh"]
        T3["CMake"]
        T4["setup.py"]
    end

    %% Third-party Dependencies & Utilities
    subgraph "Third-party Dependencies & Utilities"
        P1["third_party"]
        P2["utils"]
        P3["integration_utils/utils"]
        P4["new_files/utils"]
    end

    %% Relationships: Orchestration -> Rendering Core
    O1 -->|"commands"| R1
    O2 -->|"commands"| R1
    O3 -->|"commands"| R2
    O4 -->|"commands"| R1
    O5 -->|"commands"| R2

    %% Relationships: JAX Utilities -> Orchestration
    J1 -->|"numerical_routines"| O1

    %% Relationships: Rendering Core -> Demonstration
    R1 -->|"render_output"| D1
    R2 -->|"render_output"| D2
    R3 -->|"accelerated_rendering"| D1

    %% Relationships: Build Infrastructure connections
    T3 -->|"build_config"| R1
    T4 -->|"build_config"| R1
    T1 -->|"test_scripts"| R1
    T2 -->|"execute_tests"| T1
    T3 -->|"configures"| O1

    %% Relationships: Third-party Dependencies connections
    P1 -->|"dependency"| R3
    P2 -->|"utility"| R1
    P3 -->|"utility"| R1
    P4 -->|"utility"| R2
    P1 -->|"dependency"| T3

    %% Class definitions for colours
    class O1,O2,O3,O4,O5 orchestration
    class R1,R2,R3 rendering
    class J1 jax
    class D1,D2 demonstration
    class T1,T2,T3,T4 build
    class P1,P2,P3,P4 thirdparty

    %% Styles
    classDef orchestration fill:#ffcc99,stroke:#000,stroke-width:1px;
    classDef rendering fill:#99ddff,stroke:#000,stroke-width:1px;
    classDef jax fill:#e6ccff,stroke:#000,stroke-width:1px;
    classDef demonstration fill:#ccffcc,stroke:#000,stroke-width:1px;
    classDef build fill:#fff2cc,stroke:#000,stroke-width:1px;
    classDef thirdparty fill:#ffcccc,stroke:#000,stroke-width:1px;

    %% Click Events for Orchestration & Integration
    click O1 "https://github.com/google/ever/blob/main/eval_sh.py"
    click O2 "https://github.com/google/ever/blob/main/integration_utils/host_render_server.py"
    click O3 "https://github.com/google/ever/blob/main/new_files/host_render_server.py"
    click O4 "https://github.com/google/ever/blob/main/integration_utils/partial_eval.py"
    click O5 "https://github.com/google/ever/blob/main/new_files/partial_eval.py"

    %% Click Events for Rendering Core
    click R1 "https://github.com/google/ever/tree/main/integration_utils/gaussian_renderer"
    click R2 "https://github.com/google/ever/tree/main/new_files/gaussian_renderer"
    click R3 "https://github.com/google/ever/tree/main/splinetracers"

    %% Click Event for JAX Utilities
    click J1 "https://github.com/google/ever/tree/main/jaxutil"

    %% Click Events for Demonstration & Experimentation
    click D1 "https://github.com/google/ever/tree/main/integration_utils/notebooks"
    click D2 "https://github.com/google/ever/tree/main/new_files/notebooks"

    %% Click Events for Testing & Build Infrastructure
    click T1 "https://github.com/google/ever/tree/main/tests"
    click T2 "https://github.com/google/ever/blob/main/run_unit_tests.sh"
    click T3 "https://github.com/google/ever/tree/main/CMake"
    click T4 "https://github.com/google/ever/blob/main/setup.py"

    %% Click Events for Third-party Dependencies & Utilities
    click P1 "https://github.com/google/ever/tree/main/third_party"
    click P2 "https://github.com/google/ever/tree/main/utils"
    click P3 "https://github.com/google/ever/tree/main/integration_utils/utils"
    click P4 "https://github.com/google/ever/tree/main/new_files/utils"
```
