Skip to content

RBLN-SW/torch-rbln

PyTorch RBLN

PyTorch RBLN

PyPI version License Documentation Contributor Covenant

About

PyTorch RBLN (torch-rbln) is a PyTorch extension that allows natural use of Rebellions NPU compute within PyTorch. By implementing eager mode, which operates in a define-by-run fashion, it supports the full lifecycle of model development, deployment, and serving in the PyTorch ecosystem. It is also convenient for debugging and related workflows.

The same interface style as CPU and GPU applies — the rbln device, torch.rbln, and torch.compile — so developers and customers can target RBLN NPUs with familiar APIs. Operations on rbln tensors are integrated via PyTorch’s out-of-tree extension path; execution is coordinated with the RBLN compiler and runtime (rebel-compiler).

PyTorch RBLN is currently in beta and under active development. APIs may change between releases, backward compatibility is not guaranteed, and production use is not recommended yet. For the full notice, architecture, supported operators, and tutorials, see PyTorch RBLN — Overview in the RBLN SDK documentation. For wheels, rebel-compiler, and building from source, see Installation.

Getting started

Prerequisites

Install pre-built wheels

torch-rbln (public wheel; torch resolves to 2.10.0+cpu via the PyTorch CPU index):

pip3 install torch-rbln --extra-index-url https://download.pytorch.org/whl/cpu

For rebel-compiler and the rest of the setup, see Prerequisites above and Installation.

Build from source

  1. Install uv (see Installation — Prerequisites in the SDK docs).
  2. Follow Build from source (venv, rebel-compiler, editable build, manual steps).
git clone https://github.com/RBLN-SW/torch-rbln.git
cd torch-rbln
uv venv .venv && source .venv/bin/activate
./tools/dev-setup.sh pypi

rebel-compiler must be available in the same environment before the torch-rbln build finishes (see Prerequisites).

Documentation

RBLN SDK (hosted)

This repository

Contributing

See docs/CONTRIBUTING.md.

License

Apache License 2.0 — see LICENSE and NOTICE.

Contact