Run any PyTorch script on a remote GPU. Change zero lines of code.
Project description
Chidori GPU
Run any PyTorch script on a remote GPU. Zero code changes.
pip install chidori-gpu
Quick Start
GPU Server:
chidori serve
Client (any machine, no GPU needed):
chidori run --server GPU_HOST:43211 python train.py
Your train.py is completely unmodified. Chidori intercepts CUDA calls and routes them to the remote GPU over TCP.
Features
- Zero code changes — works with any PyTorch/HuggingFace script
- Training — full forward + backward + optimizer over the wire
- Inference — 100+ tok/s with server-side graph decode
- Multi-GPU — one client per GPU, scale to 8+ GPUs
- All PyTorch CUDA versions — cu118, cu121, cu126, cu128, cu130, cu131
Performance
Tested over WAN (70ms RTT):
| Workload | Hardware | Speed |
|---|---|---|
| Matmul 4096x4096 | A100-40GB | 96 TFLOPS |
| FP32 Training | A100-40GB | 35K tok/s |
| FP16 Training | A100-40GB | 59K tok/s |
| Inference (graph decode) | A100-40GB | 100+ tok/s |
Fast Inference
For optimized inference (100+ tok/s instead of ~1 tok/s):
import chidori
chidori.optimize()
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("model", dtype=torch.float16).cuda()
out = model.generate(inputs, max_new_tokens=100, cache_implementation="static")
Or use the direct API:
from chidori import server_decode
text = server_decode(model, tokenizer, "Hello world", max_new_tokens=100)
Multi-GPU
Start one server per GPU on different ports:
# On an 8-GPU server
for i in $(seq 0 7); do
CUDA_VISIBLE_DEVICES=$i chidori serve --port $((43211 + i)) &
done
Each client connects to a specific GPU:
chidori run -s gpu-server:43211 python job1.py # GPU 0
chidori run -s gpu-server:43212 python job2.py # GPU 1
chidori run -s gpu-server:43213 python job3.py # GPU 2
How It Works
Chidori uses LD_PRELOAD to intercept CUDA API calls at the driver level. Each call is serialized over TCP to a remote GPU server that executes it on a real GPU. The application sees a virtual GPU — no code changes needed.
- 280+ CUDA functions intercepted (Driver API, Runtime API, cuBLAS, cuBLASLt, cuDNN)
- Async RPC batching — kernel launches are fire-and-forget, batched via TCP_CORK
- Server-side graph decode — captures a CUDA graph and runs the entire inference loop server-side
- Version-aware — translates struct layouts between CUDA versions automatically
License
Apache 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chidori_gpu-0.1.2.tar.gz.
File metadata
- Download URL: chidori_gpu-0.1.2.tar.gz
- Upload date:
- Size: 813.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a16515d64cc97788150520103e3c9c2fcdc7eff55c9d997fe25daa10c54cbea1
|
|
| MD5 |
22ad15c72e4fdbdaaa9215fcd5db2264
|
|
| BLAKE2b-256 |
c88f7d439c3251a5a3a0071ae5a5fbcfee2b48a3d6e1d85094bb96f09e86baed
|
File details
Details for the file chidori_gpu-0.1.2-py3-none-any.whl.
File metadata
- Download URL: chidori_gpu-0.1.2-py3-none-any.whl
- Upload date:
- Size: 842.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef2b9afde26a312ba9d143c161b183e483e7ff6d691ab58aef5057fa0bd37a5e
|
|
| MD5 |
65d56992923afbbc76155ba9e14fa4ad
|
|
| BLAKE2b-256 |
6c1ae0d9fde660f05e50faa17c1cdc868d3050ea3f36ac637d40152f183014fc
|