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.10.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.1-cp313-cp313-manylinux_2_34_x86_64.whl (930.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl (928.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl (925.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

torch_rbln-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl (925.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for torch_rbln-0.2.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 62b7b577b3e1b987680c01452d248775fecc15c173b244ea3458c5cbd16950c1
MD5 5f753f881c95d01348f25dd5a89949f1
BLAKE2b-256 e79e04c46babae63c44c3039358633475ad1c96f4a80fbac0e0da7464470eb60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_rbln-0.2.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bcd659d87e2ab5f948ffafa80a5017cd3ea422485c8cc5749174c02bfc3102d6
MD5 09c774e892b90463f9fa96b316c89d5d
BLAKE2b-256 18be0b071870eb3d65bf3dee994d8719ebf19c288e152e9e9c2752dc673b4c94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_rbln-0.2.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 656619364eda0da06799e4b617ba3e1150b80bdc85276a42c8ba6d200def1a9d
MD5 fd1854eb6849362ac41787ec70546036
BLAKE2b-256 40f665091606dbe28724b2b7a851e2f1827161acb488b2159c4c128ce1515718

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_rbln-0.2.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3b3a7c6bb645117585cd98667025f848c03edeca066fb2842f639cd4726823e8
MD5 4a833f53ab7424682668787d1c240ed9
BLAKE2b-256 f65dc64111c75517d620fb5673a7d3fdc42b7b97e0c0045f325d402928cfcf1b

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