diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx index 0367f89d2..252575ce9 100644 --- a/docs/source/installation.mdx +++ b/docs/source/installation.mdx @@ -213,6 +213,7 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/YOUR_USERNAME/local/cuda-12.6 | **Apple Silicon (MPS)** | WIP | 3.10+ | M1/M2 chips | Planned | | **Intel CPU** | v2.4.0+ (`ipex`) | 3.10+ | Intel CPU | Alpha | | **Intel GPU** | v2.4.0+ (`ipex`) | 3.10+ | Intel GPU | Experimental | +| **Ascend NPU** | 2.1.0+ (`torch_npu`) | 3.10+ | Ascend NPU | Experimental | For each supported backend, follow the respective instructions below: @@ -285,6 +286,13 @@ pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsan pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-win_amd64.whl' ``` + + + +Compatible hardware and functioning `import torch_npu` capable environment with Python `3.10` as the minimum requirement. + +Please refer to [the official Ascend installations instructions](https://www.hiascend.com/document/detail/zh/Pytorch/60RC3/configandinstg/instg/insg_0001.html) for guidance on how to pip install the necessary `torch_npu` dependency. + @@ -344,6 +352,31 @@ make pip install -e . # `-e` for "editable" install, when developing BNB (otherwise leave that out) ``` + + + +#### Ascend NPU + +> [!TIP] +> Ascend NPU backend only supports building from source; for now, please follow the instructions below. + + +``` +# Install bitsandbytes from source +# Clone bitsandbytes repo, Ascend NPU backend is currently enabled on multi-backend-refactor branch +git clone -b multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/ + +# Install dependencies +pip install -r requirements-dev.txt + +# Compile & install +apt-get install -y build-essential cmake # install build tools dependencies, unless present +cmake -DCOMPUTE_BACKEND=npu -S . +make +pip install -e . # `-e` for "editable" install, when developing BNB (otherwise leave that out) +``` + +