Skip to main content

Rebellions Extension for PyTorch

Project description

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). Install torch from the PyTorch CPU index first, then torch-rbln from PyPI.

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

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. Configure access to the RBLN package index (see Authenticate to the RBLN package index below).
  3. 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).

Authenticate to the RBLN package index

rebel-compiler is installed from the RBLN package index (pypi.rbln.ai), which requires an RBLN Portal account. Without credentials, ./tools/dev-setup.sh pypi fails with:

❌ Cannot reach any rbln pypi index (no permission or network error).

Add your RBLN Portal credentials to ~/.netrc so pip/uv can authenticate:

machine pypi.rbln.ai
login <your-rbln-portal-id>
password <your-rbln-portal-password>

Then restrict its permissions (tools refuse a world-readable .netrc):

chmod 600 ~/.netrc

Re-run ./tools/dev-setup.sh pypi once the file is in place.

Documentation

RBLN SDK (hosted)

This repository

Contributing

See docs/CONTRIBUTING.md.

License

Apache License 2.0 — see LICENSE and NOTICE.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

torch_rbln-0.2.2-cp313-cp313-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file torch_rbln-0.2.2-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for torch_rbln-0.2.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fb7f8ac9c22ec04459f7ba608c86e5039e98ae50524d07930cd38b0a3aa00080
MD5 9a22e6dd68c1091d3733fa1b5ca77bbd
BLAKE2b-256 302a0845570aad21193f312b35395aa70780f1b55fac55b56ba13f126e9ae725

See more details on using hashes here.

File details

Details for the file torch_rbln-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for torch_rbln-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3b9a2a53ac022d54539c3f6f1e57f27ebb7431831289ce78f8015164358bfd72
MD5 0ba8ca13ff67b886f045d5aa589bcda0
BLAKE2b-256 84039931c6071b4be72771ac55d0acc54b02c80037243a06075552bbd0db7265

See more details on using hashes here.

File details

Details for the file torch_rbln-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for torch_rbln-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4a62b9c9dffa5c25c94931f40e8bea434c802e9181b1cf7fd83cae9f2135a85d
MD5 69f06e1ae7f89920dade04a553859ed7
BLAKE2b-256 b98eae06e1aaecc727e6a30e44484e1018122956bd43e02661ddc4f2d55d65cd

See more details on using hashes here.

File details

Details for the file torch_rbln-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for torch_rbln-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8edbb8f54abfe3e05c6247aa888dcdc860762c66f562f4ec4475283f64a94518
MD5 269ec3e194ce59c117da7e6c2b78fee7
BLAKE2b-256 2e03ce1bcf4b61e0862b6d5bddc3f1680e169cb7e24e328363f41de4e4bed187

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page