SYSTEMS · GPU RUNTIME

UHOP

A universal hardware optimization runtime that unifies GPU acceleration across CUDA, ROCm, Metal and OpenCL behind one decorator.

↓ SCROLL

The problem

GPU acceleration is fragmented across vendors — CUDA, ROCm/HIP, Metal, OpenCL, each with its own toolchain. Writing fast code that runs everywhere usually means hand-porting the same kernel four times, or picking one vendor and locking out the rest.

The approach

UHOP detects the machine's available backends, dispatches each operation to the fastest one, and caches the winning implementation per device so the choice is made once, not on every run. A single `@uhop.optimize("op")` decorator drops acceleration into existing Python code, and an AI kernel generator can write and validate new OpenCL/CUDA/Triton implementations when no hand-written one exists.

System design

Backend detectionTorch (CUDA/MPS/CPU), OpenCL (GPU/CPU), Triton (Linux), CPU fallback
DispatchPolicy modes (order_probe, benchmark) with explain tooling
CachingOn-disk cache of the selected kernel/implementation per device
AI codegenOpenAI-backed kernel generation for OpenCL/CUDA/Python/Triton, with validation and smoke tests
IRMinimal IR (MatMul, Relu, FusedMatMulRelu) lowering to OpenCL via a Local Agent

What it does

Drop-in acceleration

The @uhop.optimize decorator accelerates an operation like matmul with no rewrite.

AI kernel generation

Generates and validates new GPU kernels when no hand-written implementation exists yet.

Transparent backend choice

uhop policy explain shows exactly why a given backend was picked for a device.

KPI snapshot

Per-backend selection counts, OpenCL matmul GFLOPS, and Conv2D stage timings via one CLI command.

Stack

PythonPyTorchOpenCLTritonCUDA
2026Year
CUDA/ROCm/Metal/OpenCLBackends
AI kernel genFeature
LiveStatus