This release is a pre-release and may not be stable for production use.
bitsandbytes Intel Backend
Registration for Intel optimized bitsandbytes operators.
Quick Start
# Build and enter container
docker compose run --build --rm bnb-intel-dev /bin/bash
# Run validation (inside container):
python -m bitsandbytes_intel
Testing
Expected successful output:
root@pvc-hf-1100-00:/workspace# python -m bnb_intel
Initializing bnb_intel module
[W414 18:23:28.291667720 OperatorEntry.cpp:154] Warning: Warning only once for all operators, other operators may also be overridden.
Overriding a previously registered kernel for the same operator and the same dispatch key
operator: aten::_validate_compressed_sparse_indices(bool is_crow, Tensor compressed_idx, Tensor plain_idx, int cdim, int dim, int nnz) -> ()
registered at /pytorch/build/aten/src/ATen/RegisterSchema.cpp:6
dispatch key: XPU
previous kernel: registered at /pytorch/build/aten/src/ATen/RegisterCPU.cpp:30477
new kernel: registered at /build/intel-pytorch-extension/build/Release/csrc/gpu/csrc/aten/generated/ATen/RegisterXPU.cpp:468 (function operator())
2025-04-14 18:23:29,577 - bitsandbytes.cextension - WARNING - The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers and GPU quantization are unavailable.
Loading ops module
ops module loaded
Registering XPU implementations
Successfully registered XPU implementation
Registering HPU implementations
Successfully registered HPU implementations
🧪 Running minimal XPU backend test...
int8_linear_matmul_xpu called with tensors of shape: torch.Size([32, 64]) torch.Size([128, 64])
✅ Operator executed successfully!
Input shapes: torch.Size([32, 64]) x torch.Size([128, 64])
Output shape: torch.Size([32, 128])
Output device: xpu:0
[W414 18:23:30.825181068 OperatorEntry.cpp:154] Warning: Warning only once for all operators, other operators may also be overridden.
Overriding a previously registered kernel for the same operator and the same dispatch key
operator: aten::_validate_compressed_sparse_indices(bool is_crow, Tensor compressed_idx, Tensor plain_idx, int cdim, int dim, int nnz) -> ()
registered at /pytorch/build/aten/src/ATen/RegisterSchema.cpp:6
dispatch key: XPU
previous kernel: registered at /pytorch/build/aten/src/ATen/RegisterCPU.cpp:30477
new kernel: registered at /build/intel-pytorch-extension/build/Release/csrc/gpu/csrc/aten/generated/ATen/RegisterXPU.cpp:468 (function operator())
Technical Implementation
Key files:
src/bitsandbytes_intel/ops.py- Intel kernel registrationsrc/bitsandbytes_intel/__init__.py- Autoload setupdocker-compose.yml- Build environmentsetup.py- Package configuration
Uses PyTorch's autoload mechanism to register:
@torch.library.impl("bitsandbytes::int8_linear_matmul", "XPU")
Release files for bitsandbytes-intel 0.0.1.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bitsandbytes_intel-0.0.1.dev0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bitsandbytes_intel-0.0.1.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.1 kB
Release files / bitsandbytes_intel-0.0.1.dev0.tar.gz
| Download URL | bitsandbytes_intel-0.0.1.dev0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5514e272c34116369dea2f5ed85a497e22f1aa4fec2d4796b8bc6b9cd63faf8f
|
|
BLAKE2b-256 checksum How to use checksums |
5ce773dbb32c732b4cadaeddc8abe84371c71c39550ef549dfa969a7b980cad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.
Transparency logRelease files / bitsandbytes_intel-0.0.1.dev0-py3-none-any.whl
| Download URL | bitsandbytes_intel-0.0.1.dev0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd41e27c40851fdbda23c3b389b9b9b7c5517925b38fe91fbf3d931353b5a04e
|
|
BLAKE2b-256 checksum How to use checksums |
961dff2d949abb566174c50404e444464809d5f5d27ecc05b33c7058ce70f5fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.
Transparency log