Rebellions Extension for PyTorch
Project description
PyTorch RBLN
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.
Getting started
Prerequisites
- Python 3.10–3.13 — see Developer guide — Requirements.
rebel-compiler— required; not installed withtorch-rbln. Use an RBLN Portal account and the RBLN package index as described in How to install.
Install pre-built wheels
torch-rbln (public wheel; torch resolves to 2.9.1+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 How to install.
Build from source
- Install uv.
- Follow Developer guide (venv,
rebel-compiler, editable build).
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)
- Overview — install, design, tutorials
- Developer guide — source build, versions, internal PyPI
- Troubleshooting —
librbln/torch_rbln.diagnose, core dumps, logging, dtype / CPU, memory (maintained in the RBLN SDK docs)
This repository
- Configuration — environment variables and runtime options
- Test Guide — local test runs
- Linting — code style and lint
- Third-party update — PyTorch pin, upstream files,
rebel-compilerversion bumps inpyproject.toml
Contributing
See docs/CONTRIBUTING.md.
License
Apache License 2.0 — see LICENSE and NOTICE.
Contact
- Community: discuss.rebellions.ai
- Email: support@rebellions.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 torch_rbln-0.1.8-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.1.8-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffdd5d8d9f821c1d6441cb145df0dc46a543bda468f873feefc9ff60318841c3
|
|
| MD5 |
cc9bbf929495bcef562afd7ab9ccb6f5
|
|
| BLAKE2b-256 |
2403e82bbad236479226e4a88aa13c13737de11aec381aa02816205f835ee46b
|
File details
Details for the file torch_rbln-0.1.8-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.1.8-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a3bee15ea04bda3728554b67f0d73bf287da6cdb20632713b2d0277cb696508
|
|
| MD5 |
3f5c9edd5a34547093b4ee34bfee9e50
|
|
| BLAKE2b-256 |
5d76beb75d6dc24363e4e6f9a3b88e67153b8e3f5c2098032892a29e0daa887f
|
File details
Details for the file torch_rbln-0.1.8-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.1.8-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feecc2639b1d88671f180eca84f2641bc6624784a7d2857de45c7db9f70602e3
|
|
| MD5 |
7966302005ac8dd2275e39385d5fab3c
|
|
| BLAKE2b-256 |
7430857fec6125fef0a1ebedaccc959fd3c4db43dffe853dde3e93d9446a0566
|
File details
Details for the file torch_rbln-0.1.8-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: torch_rbln-0.1.8-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a5d64f6a251a767e86d15d4f4228f5cdc2846b67612e81bfc804c4f8318e3c2
|
|
| MD5 |
285168fd3354273916b2d8823fd59dac
|
|
| BLAKE2b-256 |
47aa60395fbe027d4404233c6c0a22afabc52327dc8a669b2b0965c4ff35b23a
|