Skip to content

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenUMA

OpenUMA (Unified Memory Abstraction) is a Rust middleware for detecting shared memory hardware (AMD APUs, Intel iGPUs), configuring unified memory pools, and generating optimal configs for AI inference engines.

Build License Rust Platform Version

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          OpenUMA v0.6.2                                  β”‚
β”‚              Unified Memory Abstraction for AI Inference                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Features

  • Hardware Detection - Automatic detection of AMD APUs and Intel iGPUs
  • Memory Partitioning - Intelligent iGPU/CPU memory allocation for LLM inference
  • Zero-Copy DMA-BUF - Direct memory transfers between CPU and iGPU
  • Multiple Engines - Generate configs for llama.cpp, Ollama, and KTransformers
  • Interactive TUI - Full terminal UI for hardware monitoring and configuration
  • Benchmarking - Real inference benchmarks with llama.cpp

Supported Hardware

Vendor Series Examples
AMD Zen 3 (Cezanne, Renoir) Ryzen 5 5600G, Ryzen 7 5700G
AMD Zen 4 (Phoenix, Hawk Point) Ryzen 7 7840HS, Ryzen AI 9 HX 370
AMD Zen 5 (Strix Point) Ryzen AI 9 HX 370, Ryzen AI 7 350
Intel Alder Lake, Raptor Lake Core i5-1240P, Core i7-12700H
Intel Meteor Lake, Lunar Lake Core Ultra 5 125H, Core Ultra 7 258V

Quick Start

# Build
cargo build --release

# Detect hardware
./target/release/openuma probe

# Launch interactive TUI
./target/release/openuma tui

# Generate config for llama.cpp
./target/release/openuma configure --engine llamacpp --model model.gguf

Terminal UI

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  [D]ashboard  [M]emory  [B]enchmark  [P]rofiles  [C]onfigure  [S]ettingsβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  ╔═══════════════════════════════════════════════════════════════════╗  β”‚
β”‚  β•‘                     Hardware Overview                             β•‘  β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣  β”‚
β”‚  β•‘  CPU    AMD Ryzen 5 5600G (Cezanne)                             β•‘  β”‚
β”‚  β•‘          6 cores (12 threads), AVX2, 16MB L3                     β•‘  β”‚
β”‚  β•‘  iGPU   AMD Vega7 (Raven Ridge)                                  β•‘  β”‚
β”‚  β•‘          7 CUs, 512MB / 16384MB shared VRAM                      β•‘  β”‚
β”‚  β•‘          Vulkan βœ“  OpenCL βœ“  Zero-copy βœ“                         β•‘  β”‚
β”‚  β•‘  RAM    32GB DDR4-3200 (Dual-channel)                            β•‘  β”‚
β”‚  β•‘          51.2 GB/s theoretical, 46.8 GB/s measured               β•‘  β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣  β”‚
β”‚  β•‘  βœ“ Unified Memory Available    Tier: CONSUMER_UMA                 β•‘  β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  β”‚
β”‚                                                                         β”‚
β”‚  Memory Partition:  iGPU: 7168 MB (35.0%)  CPU: 13312 MB (65.0%)       β”‚
β”‚  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 35%            β”‚
β”‚                                                                         β”‚
β”‚  Strategy: HybridIgpu  Zero-copy: Available                            β”‚
β”‚                                                                         β”‚
β”‚  [r] Refresh    [q] Quit                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Commands

Command Description
openuma probe Detect hardware profile
openuma tui Launch interactive terminal UI
openuma partition --model <path> Show memory partition for model
openuma configure --engine <engine> --model <path> Generate engine config
openuma benchmark --model <path> Run inference benchmark
openuma zerocopy --test Test DMA-BUF zero-copy
openuma serve Start REST API server (coming v0.7)
openuma profile list List known hardware profiles

Supported Inference Engines

llama.cpp

openuma configure --engine llamacpp --model llama3-8b-q4_k_m.gguf

Ollama

openuma configure --engine ollama --model llama3-8b-q4_k_m.gguf

KTransformers (MoE models)

openuma configure --engine ktransformers --model deepseek-v3-q4km.gguf

How It Works

Memory Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Unified Memory Pool                       β”‚
β”‚                                                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   iGPU VRAM  β”‚  ◄── Zero-Copy ──►│   System RAM        β”‚  β”‚
β”‚  β”‚   (Shared)   β”‚      DMA-BUF        β”‚   (DDR4/DDR5)       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                β”‚
β”‚  Attention layers benefit from iGPU                             β”‚
β”‚  MoE experts stay on CPU                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Insight

For LLM inference on APUs:

  • Attention layers β†’ benefit from iGPU (parallel matrix ops)
  • MoE expert layers β†’ should stay on CPU (sparse activation)
  • KV cache β†’ benefits from unified memory zero-copy

Benchmarking

# Quick benchmark
openuma benchmark --model llama3-8b-q4_k_m.gguf

# Full multi-backend comparison
openuma benchmark --model model.gguf --full
╔════════════════════════════════════════════════════════════════════╗
β•‘                     OpenUMA Benchmark Report                          β•‘
╠════════════════════════════════════════════════════════════════════╣
β•‘ Best Backend: vulkan (12.5 t/s)
β•‘ Average TPS: 8.2
╠════════════════════════════════════════════════════════════════════╣
β•‘ Test 1: model.gguf [vulkan]
β•‘   └── 12.5 tokens/sec | 8000 ms
β•‘ Test 2: model.gguf [opencl]
β•‘   └── 10.2 tokens/sec | 9800 ms
β•‘ Test 3: model.gguf [cpu]
β•‘   └── 4.8 tokens/sec | 20800 ms
╠════════════════════════════════════════════════════════════════════╣
β•‘ Recommendations:
β•‘ β€’ Best performing backend: vulkan (~12.5 tokens/sec)
β•‘ β€’ GPU acceleration provides 2.6x speedup over CPU
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Architecture

openuma/
β”œβ”€β”€ crates/
β”‚   β”œβ”€β”€ hw_probe/      # Hardware detection
β”‚   β”œβ”€β”€ mem_mgr/       # Memory partitioning + zero-copy
β”‚   β”œβ”€β”€ config_gen/    # Model metadata (GGUF)
β”‚   β”œβ”€β”€ profile_db/    # Hardware profile database
β”‚   β”œβ”€β”€ benchmark/     # Inference benchmarking
β”‚   β”œβ”€β”€ api_server/    # REST API
β”‚   β”œβ”€β”€ cli/           # CLI interface
β”‚   └── tui/           # Terminal UI
└── profiles/          # Hardware profiles

Installation

Option A β€” Download Binary

Linux:

curl -L https://github.com/hamtun24/openuma/releases/latest/download/openuma-linux-x86_64.tar.gz \
  | tar xz
./openuma probe

macOS (Intel):

curl -L https://github.com/hamtun24/openuma/releases/latest/download/openuma-macos-x86_64.tar.gz \
  | tar xz
./openuma probe

macOS (Apple Silicon):

curl -L https://github.com/hamtun24/openuma/releases/latest/download/openuma-macos-arm64.tar.gz \
  | tar xz
./openuma probe

Windows:

# Download from releases page or use PowerShell
Invoke-WebRequest -Uri https://github.com/hamtun24/openuma/releases/latest/download/openuma-windows-x86_64.zip -OutFile openuma.zip
Expand-Archive openuma.zip
.\openuma.exe probe

Option B β€” Build from Source

# Prerequisites: Rust 1.70+
git clone https://github.com/hamtun24/openuma.git
cd openuma
cargo build --release
./target/release/openuma probe

Cross-Platform Compilation

# Add targets
rustup target add x86_64-pc-windows-msvc
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin

# Build for specific platform
cargo build --release --target x86_64-pc-windows-msvc

System Requirements

Requirement Linux macOS Windows
OS Linux (kernel 5.10+) macOS 12+ Windows 10+
CPU x86_64/ARM64 ARM64 (Apple Silicon) or x86_64 x86_64
RAM 16GB minimum 16GB minimum 16GB minimum
GPU AMD APU / Intel iGPU Apple Silicon GPU Intel iGPU / AMD APU
Optional Vulkan drivers Metal (built-in) DirectX 12

Install Vulkan Drivers (if missing)

# AMD iGPU
sudo apt install mesa-vulkan-drivers

# Intel iGPU  
sudo apt install intel-media-va-driver mesa-vulkan-drivers

Install llama.cpp (optional)

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build && cd build
cmake .. -DLLAMA_BUILD_EXAMPLES=ON
make -j$(nproc)
export PATH="$PATH:$(pwd)/bin"

Real World Results

OpenUMA's value is in the configuration it generates β€” not just detecting hardware, but knowing the exact flags that extract maximum performance from it.

Example: AMD Ryzen 5 5600G + 32GB DDR4

Setup Command Tokens/sec
llama.cpp defaults llama-cli -m model.gguf ~3.1 t/s
OpenUMA-configured openuma configure --engine llamacpp --model model.gguf ~7.2 t/s
Improvement +132%

What OpenUMA changed:

  • Enabled Vulkan backend (default is CPU)
  • Set correct --n-gpu-layers for available shared VRAM
  • Configured dual-channel memory-aware thread count
  • Disabled mmap in favor of zero-copy DMA-BUF path

Note: Numbers above are estimates from the profile database for this hardware. Run openuma benchmark --model your-model.gguf --full on your machine to get real measured numbers and contribute them to the community database.

Community Benchmarks

This section will grow as users submit hardware profiles. Submit your results β†’

Contributing

Contributions welcome! Open issues and pull requests.

License

MIT License - see LICENSE for details.


OpenUMA - Making every x86 machine a first-class AI citizen.

About

Unified Memory Abstraction Layer for AI Inference on AMD APUs and Intel iGPUs

Topics

Resources

Contributing

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages