How xpu-io/tutti works
Tutti is a GPU-centric, NVMe-backed KV-cache object store with a C++ storage runtime and a Python KV-cache engine/vLLM integration. The principal workflow is: vLLM requests layer-wise cache loads or saves; the worker coordinates staging and the engine; chunk indexing and the NVMe store plan and submit I/O through the native runtime; registered data paths move data between GPU memory and storage. The graph also shows native configuration, resolution, striped I/O, and device management. Some links are documented in the README or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: core.py KV Engine · local_nvme_data_path.cpp Local NVMe Path · worker.py Layer Worker · store.py NVMe KV Store
Components 25
vLLM Integration
- Layer Worker
tutti/integration/vllm/worker.py - Worker Metadata
tutti/integration/vllm/worker_meta.py - vLLM Connector
tutti/integration/vllm/connector.py
KV Engine
- KV Engine
tutti/engine/core.py - GPU Staging
tutti/engine/staging.py - KV Transfer
tutti/engine/transfer.py - Chunk Index
tutti/index/chunk_index.py - NVMe KV Store
tutti/storage/tutti_nvme/store.py - Object Layout
tutti/storage/tutti_nvme/object_layout.py
Native Runtime
- Storage Runtime API
csrc/include/tutti/storage_runtime.h - Runtime Assembly
csrc/tutti_runtime/tutti_runtime_create.cpp - File Resolver
csrc/resolvers/local_file/resolver.h - Resolved Payload
csrc/payloads/ext4_local_nvme/payload.h - Data Path Factory
csrc/data_paths/data_path_factory.cpp
GPU Data Paths
- Local NVMe Path
csrc/data_paths/local_nvme/local_nvme_data_path.cpp - Striped NVMe Path
csrc/data_paths/striped_local_nvme/striped_data_path.cpp - PRP Builder
csrc/data_paths/local_nvme/io/prp_builder.h - PRP Caches
csrc/data_paths/local_nvme/metadata/prp_page_cache.h
NVMe Management
- NVMe Service
csrc/device_manager/nvme/nvmeservice/src/nvmeservice_state.cpp - Mount Manager
csrc/device_manager/nvme/nvmeservice/src/mount_manager.cpp - GPU NVMe Client
csrc/device_manager/nvme/libnvm/src/ctrl.cpp - snvme Kernel
csrc/device_manager/nvme/kernel_modules/snvme/snvm_control.c
Other components
- vLLM
- NVMe SSDs
- GPU HBM
Connections 28
- vLLM → vLLM Connector: calls
- vLLM Connector → Layer Worker: dispatches layers
- Layer Worker → KV Engine: orchestrates
tutti/integration/vllm/worker.py - Layer Worker → GPU Staging: allocates staging
tutti/integration/vllm/worker.py - Layer Worker → Worker Metadata: publishes results
tutti/integration/vllm/worker.py - KV Engine → GPU Staging: uses
tutti/engine/core.py - KV Engine → KV Transfer: selects transfer
tutti/engine/core.py - KV Engine → Chunk Index: indexes chunks
tutti/engine/core.py - KV Engine → NVMe KV Store: uses store
tutti/engine/core.py - NVMe KV Store → Object Layout: maps objects
tutti/storage/tutti_nvme/store.py - NVMe KV Store → Storage Runtime API: submits I/O
tutti/storage/tutti_nvme/store.py - Storage Runtime API → Runtime Assembly: implemented by
- Runtime Assembly → File Resolver: configures resolver
csrc/tutti_runtime/tutti_runtime_create.cpp - Runtime Assembly → Data Path Factory: creates path
csrc/tutti_runtime/tutti_runtime_create.cpp - File Resolver → Resolved Payload: produces target
csrc/payloads/ext4_local_nvme/payload.h - Data Path Factory → Local NVMe Path: selects local
- Data Path Factory → Striped NVMe Path: selects striped
- Local NVMe Path → PRP Builder: builds PRPs
csrc/data_paths/local_nvme/local_nvme_data_path.cpp - Local NVMe Path → PRP Caches: uses caches
- Local NVMe Path → GPU NVMe Client: drives NVMe
- Striped NVMe Path → NVMe SSDs: writes striped data
- NVMe Service → Mount Manager: manages mounts
- Mount Manager → NVMe SSDs: mounts devices
csrc/device_manager/nvme/nvmeservice/src/mount_manager.cpp - NVMe Service → snvme Kernel: leases queues
- GPU NVMe Client → snvme Kernel: uses queues
- GPU NVMe Client → NVMe SSDs: issues I/O
- Local NVMe Path → GPU HBM: transfers data
- GPU HBM → NVMe SSDs: P2P DMA