# rocm/mori architecture

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

- Interactive diagram: https://gitdiagram.com/rocm/mori
- Repository: https://github.com/rocm/mori

## Overview

MORI is a GPU communication framework and suite of higher-level libraries, centered on RDMA/GPU integration. A typical application invokes collective, expert-parallel, shared-memory, or point-to-point APIs; those facilities use MORI’s topology, memory, bootstrap, and transport building blocks to move data across devices and nodes. UMBP is a distinct memory-pooling product: its clients access distributed key/value data managed across memory and storage tiers. The README documents these capabilities, but most implementation paths were not sampled, so uncertain internal wiring is omitted.

Main entry points: [`src/umbp/include/umbp/distributed/routing/router.h`](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/routing/router.h) (Distributed router), [`python/mori/ops/dispatch_combine.py`](https://github.com/rocm/mori/blob/main/python/mori/ops/dispatch_combine.py) (Dispatch-combine APIs), [`python/mori/__init__.py`](https://github.com/rocm/mori/blob/main/python/mori/__init__.py) (Python APIs), [`include/mori/application/topology/topology.hpp`](https://github.com/rocm/mori/blob/main/include/mori/application/topology/topology.hpp) (Hardware topology)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_framework["Communication framework"]
  node_python_api["Python APIs<br/>[__init__.py]"]
  node_cpp_bindings["Python bindings<br/>[mori.cpp]"]
  node_bootstrap["Process bootstrap<br/>[bootstrap.hpp]"]
  node_topology["Hardware topology<br/>[topology.hpp]"]
  node_memory["Memory management"]
  node_transport["Transport layer<br/>[transport.hpp]"]
end

subgraph group_ccl["Collectives"]
  node_ccl_api["Collective APIs<br/>[collective.py]"]
  node_ccl_runtime["Collective runtime<br/>[collective.cpp]"]
  node_ccl_algorithms["Collective algorithms<br/>[collective.hpp]"]
end

subgraph group_ep["Expert parallel"]
  node_ep_api["Dispatch-combine APIs"]
  node_ep_v2["EP v2 kernels"]
  node_ep_native["EP native kernels"]
end

subgraph group_io_shmem["GPU communication"]
  node_io_api["IO engine API<br/>[engine.py]"]
  node_io_engine["Transfer engine<br/>[engine.cpp]"]
  node_io_backends["Transfer backends<br/>[backend.hpp]"]
  node_shmem_api["SHMEM APIs<br/>[shmem_api.hpp]"]
  node_ir["GPU kernel IR<br/>[ops.py]"]
end

subgraph group_umbp["Memory pool"]
  node_umbp_client["UMBP client<br/>[umbp_client.h]"]
  node_umbp_router["Distributed router<br/>[router.h]"]
  node_umbp_tiers["Storage tiers<br/>[storage_tier.h]"]
  node_umbp_transfer["Tier transfer engines<br/>[transfer_engine.h]"]
  node_metadata[("Pool metadata")]
end

node_application(("GPU application"))

node_application -->|"calls"| node_python_api
node_python_api -->|"invokes"| node_cpp_bindings
node_application -->|"calls"| node_ccl_api
node_ccl_api -->|"dispatches"| node_ccl_runtime
node_ccl_runtime -->|"selects"| node_ccl_algorithms
node_application -->|"calls"| node_ep_api
node_ep_api -->|"dispatches"| node_ep_v2
node_ep_api -->|"dispatches"| node_ep_native
node_application -->|"calls"| node_io_api
node_io_api -->|"invokes"| node_io_engine
node_io_engine -->|"routes transfers"| node_io_backends
node_application -->|"calls"| node_shmem_api
node_application -->|"uses"| node_ir
node_application -->|"accesses pool"| node_umbp_client
node_umbp_client -->|"routes requests"| node_umbp_router
node_umbp_router -->|"queries metadata"| node_metadata
node_umbp_router -->|"selects tier"| node_umbp_tiers
node_umbp_router -->|"transfers data"| node_umbp_transfer
node_umbp_transfer -->|"reads and writes"| node_umbp_tiers
node_bootstrap -->|"initializes"| node_topology
node_topology -->|"informs placement"| node_memory
node_transport -->|"provides transports"| node_io_backends

click node_python_api "https://github.com/rocm/mori/blob/main/python/mori/__init__.py"
click node_cpp_bindings "https://github.com/rocm/mori/blob/main/src/pybind/mori.cpp"
click node_bootstrap "https://github.com/rocm/mori/blob/main/include/mori/application/bootstrap/bootstrap.hpp"
click node_topology "https://github.com/rocm/mori/blob/main/include/mori/application/topology/topology.hpp"
click node_memory "https://github.com/rocm/mori/blob/main/include/mori/application/memory/symmetric_memory.hpp"
click node_transport "https://github.com/rocm/mori/blob/main/include/mori/application/transport/transport.hpp"
click node_ccl_api "https://github.com/rocm/mori/blob/main/python/mori/ccl/collective.py"
click node_ccl_runtime "https://github.com/rocm/mori/blob/main/src/collective/core/collective.cpp"
click node_ccl_algorithms "https://github.com/rocm/mori/blob/main/include/mori/collective/collective.hpp"
click node_ep_api "https://github.com/rocm/mori/blob/main/python/mori/ops/dispatch_combine.py"
click node_ep_v2 "https://github.com/rocm/mori/blob/main/python/mori/ops/dispatch_combine_v2/dispatch_combine_op.py"
click node_ep_native "https://github.com/rocm/mori/blob/main/src/ops/dispatch_combine/dispatch_combine.cpp"
click node_io_api "https://github.com/rocm/mori/blob/main/python/mori/io/engine.py"
click node_io_engine "https://github.com/rocm/mori/blob/main/src/io/engine.cpp"
click node_io_backends "https://github.com/rocm/mori/blob/main/include/mori/io/backend.hpp"
click node_shmem_api "https://github.com/rocm/mori/blob/main/include/mori/shmem/shmem_api.hpp"
click node_ir "https://github.com/rocm/mori/blob/main/python/mori/ir/ops.py"
click node_umbp_client "https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/umbp_client.h"
click node_umbp_router "https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/routing/router.h"
click node_umbp_tiers "https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/local/storage_tier.h"
click node_umbp_transfer "https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/transfer/transfer_engine.h"
click node_metadata "https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/master/master_metadata_store.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_python_api,node_cpp_bindings,node_bootstrap,node_topology,node_memory,node_transport toneBlue
class node_ccl_api,node_ccl_runtime,node_ccl_algorithms toneAmber
class node_ep_api,node_ep_v2,node_ep_native toneMint
class node_io_api,node_io_engine,node_io_backends,node_shmem_api,node_ir toneRose
class node_umbp_client,node_umbp_router,node_umbp_tiers,node_umbp_transfer,node_metadata,node_application toneIndigo
```

## Components

### Communication framework

- [Python APIs](https://github.com/rocm/mori/blob/main/python/mori/__init__.py): `python/mori/__init__.py`
- [Python bindings](https://github.com/rocm/mori/blob/main/src/pybind/mori.cpp): `src/pybind/mori.cpp`
- [Process bootstrap](https://github.com/rocm/mori/blob/main/include/mori/application/bootstrap/bootstrap.hpp): `include/mori/application/bootstrap/bootstrap.hpp`
- [Hardware topology](https://github.com/rocm/mori/blob/main/include/mori/application/topology/topology.hpp): `include/mori/application/topology/topology.hpp`
- [Memory management](https://github.com/rocm/mori/blob/main/include/mori/application/memory/symmetric_memory.hpp): `include/mori/application/memory/symmetric_memory.hpp`
- [Transport layer](https://github.com/rocm/mori/blob/main/include/mori/application/transport/transport.hpp): `include/mori/application/transport/transport.hpp`

### Collectives

- [Collective APIs](https://github.com/rocm/mori/blob/main/python/mori/ccl/collective.py): `python/mori/ccl/collective.py`
- [Collective runtime](https://github.com/rocm/mori/blob/main/src/collective/core/collective.cpp): `src/collective/core/collective.cpp`
- [Collective algorithms](https://github.com/rocm/mori/blob/main/include/mori/collective/collective.hpp): `include/mori/collective/collective.hpp`

### Expert parallel

- [Dispatch-combine APIs](https://github.com/rocm/mori/blob/main/python/mori/ops/dispatch_combine.py): `python/mori/ops/dispatch_combine.py`
- [EP v2 kernels](https://github.com/rocm/mori/blob/main/python/mori/ops/dispatch_combine_v2/dispatch_combine_op.py): `python/mori/ops/dispatch_combine_v2/dispatch_combine_op.py`
- [EP native kernels](https://github.com/rocm/mori/blob/main/src/ops/dispatch_combine/dispatch_combine.cpp): `src/ops/dispatch_combine/dispatch_combine.cpp`

### GPU communication

- [IO engine API](https://github.com/rocm/mori/blob/main/python/mori/io/engine.py): `python/mori/io/engine.py`
- [Transfer engine](https://github.com/rocm/mori/blob/main/src/io/engine.cpp): `src/io/engine.cpp`
- [Transfer backends](https://github.com/rocm/mori/blob/main/include/mori/io/backend.hpp): `include/mori/io/backend.hpp`
- [SHMEM APIs](https://github.com/rocm/mori/blob/main/include/mori/shmem/shmem_api.hpp): `include/mori/shmem/shmem_api.hpp`
- [GPU kernel IR](https://github.com/rocm/mori/blob/main/python/mori/ir/ops.py): `python/mori/ir/ops.py`

### Memory pool

- [UMBP client](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/umbp_client.h): `src/umbp/include/umbp/umbp_client.h`
- [Distributed router](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/routing/router.h): `src/umbp/include/umbp/distributed/routing/router.h`
- [Storage tiers](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/local/storage_tier.h): `src/umbp/include/umbp/local/storage_tier.h`
- [Tier transfer engines](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/transfer/transfer_engine.h): `src/umbp/include/umbp/distributed/transfer/transfer_engine.h`
- [Pool metadata](https://github.com/rocm/mori/blob/main/src/umbp/include/umbp/distributed/master/master_metadata_store.h): `src/umbp/include/umbp/distributed/master/master_metadata_store.h`

### Other components

- **GPU application**

## Connections

- GPU application → Python APIs: calls
- Python APIs → Python bindings: invokes
- GPU application → Collective APIs: calls
- Collective APIs → Collective runtime: dispatches
- Collective runtime → Collective algorithms: selects
- GPU application → Dispatch-combine APIs: calls
- Dispatch-combine APIs → EP v2 kernels: dispatches
- Dispatch-combine APIs → EP native kernels: dispatches
- GPU application → IO engine API: calls
- IO engine API → Transfer engine: invokes
- Transfer engine → Transfer backends: routes transfers
- GPU application → SHMEM APIs: calls
- GPU application → GPU kernel IR: uses
- GPU application → UMBP client: accesses pool
- UMBP client → Distributed router: routes requests
- Distributed router → Pool metadata: queries metadata
- Distributed router → Storage tiers: selects tier
- Distributed router → Tier transfer engines: transfers data
- Tier transfer engines → Storage tiers: reads and writes
- Process bootstrap → Hardware topology: initializes
- Hardware topology → Memory management: informs placement
- Transport layer → Transfer backends: provides transports
