Install Riptorch. 0.4.0
Riptorch is a PyTorch-compatible library whose engine is written in Raya. Your PyTorch code runs with one line changed. Python 3.10 to 3.14, on macOS, Linux and Windows.
pip install riptorch
No compiler needed. Nothing is compiled on your machine, so you don’t need the Xcode command-line tools, Visual Studio or gcc.
pip installs the prebuilt wheel for your platform from PyPI, built and checked by Riptide on every supported platform before release.
Where it installs
| Platform | Wheel | Notes |
|---|---|---|
| macOS, Apple silicon | macosx_14_0_arm64 | macOS 14 or later. GPU through Metal |
| macOS, Intel | macosx_11_0_x86_64 | macOS 11 or later |
| Linux x86-64 | manylinux_2_28_x86_64 | glibc 2.28+. NVIDIA GPUs with riptorch[cuda] |
| Linux aarch64 | manylinux_2_28_aarch64 | glibc 2.28+ |
| Windows x64 | win_amd64 | Windows 10 / 11, 64-bit Python |
Python 3.10 to 3.14. There is one wheel per platform. On any other platform or Python, pip install riptorch stops with a clear message saying why, and which platforms are supported. Nothing is built from source.
Riptorch itself needs no Visual C++ runtime (it’s linked statically). Stock PyTorch does: on a fresh Windows, import torch fails with WinError 126 until the Microsoft Visual C++ Redistributable (x64) is installed. That matters only if you also use stock PyTorch, for example for the handoff to PyTorch’s kernels.
NVIDIA, Apple and AMD
NVIDIA GPUs (CUDA), on Linux
pip install "riptorch[cuda]"
Lazy graphs run on the GPU through NVRTC, with cuBLAS matmul, cuDNN conv2d and exact integer GEMM on tensor cores. torch.cuda answers. No NVIDIA libraries ship in Riptorch’s wheel.
Apple silicon and AMD
Apple silicon: GPU through Metal, with no extra install.
AMD: AMD GPU support is experimental. The newer AMD paths are behind RIPTORCH_AMD_NEXT=1 and haven’t run on AMD hardware yet.
Change one import
# before: import torch import riptorch as torch x = torch.rand(1024, 1024) print((x @ x).shape) # torch.Size([1024, 1024])
Riptorch puts correct results first: for example, integer matrix multiplies are exact instead of wrapping. torch.set_compat("pytorch") gives stock PyTorch’s behaviour everywhere.
Check your install
The version
python -m pip show riptorch
Shows
Version: 0.4.0.An exact integer matrix multiply
python -c "import riptorch as torch; a = torch.tensor([[100, 100], [100, 100]], dtype=torch.int8); print(a @ a)"
Prints
20000in every entry, asint32. Stock PyTorch keeps the int8 type, so the same sum wraps around.Where each op runs
python -c "import riptorch as torch; print(torch.routes())"
The routing table picks a method for each op, dtype, device, platform and size class.
RIPTORCH_ROUTE=op.dtype.device=methodoverrides it. On an NVIDIA machine withriptorch[cuda],torch.cuda.is_available()answersTrue.
What 0.4.0 doesn’t do yet
From the Riptorch 0.4.0 release notes. The PyPI page has the install and platform notes.
- The handoff to PyTorch’s kernels has limits. It works on CPU only and needs stock PyTorch imported before Riptorch. If Riptorch is imported first, it answers
import torchand the handoff stays off. Very small calls can still be slower because of per-call overhead. - Many operations are still slower than stock PyTorch. This is mostly outside matmul and search, and mostly on Linux CPU.
- The vector-search speedups were measured at large collections (2M and 8M documents).
- AMD GPU support is experimental. The newer AMD paths are behind
RIPTORCH_AMD_NEXT=1and haven’t run on AMD hardware yet. - Some systems have no wheel: musl / Alpine, glibc older than 2.28, 32-bit systems, Windows on Arm with ARM64 Python, and Python older than 3.10.
- GPU memory is recycled late. A tensor’s GPU buffer is reused only after the engine’s garbage collection and a stream sync, so workloads with many small GPU operations pay for fresh allocations and run slower than stock PyTorch. Prefer fewer, larger operations (for example, one large random draw per batch). A caching allocator is planned for 0.4.1.
- Random numbers in 0.4.0 are reproducible but basic.
manual_seedgives the same values on every run, butgenerator=anddevice=are not honoured (one global stream, drawn on the CPU), and there is no Philox orSobolEngineyet. A counter-based generator, bit-identical across CPU and GPUs, is planned for 0.4.1. - Small-model training on CPU is slower than stock PyTorch. On small LSTM and transformer models, a training step took about 8–10× longer than stock PyTorch, while giving bit-identical results across Intel, AMD and Arm CPUs.
- Free-threaded Python builds (such as 3.14t) are untested.