Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions bitsandbytes/backends/cpu/ops.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from collections.abc import Sequence
import ctypes as ct
import warnings

import torch

Expand Down Expand Up @@ -119,7 +118,3 @@ def _(
shape,
dtype,
)
else:
warnings.warn(
"You can install intel_extension_for_pytorch to get better performance on NF4 if you are using Intel CPUs."
)
7 changes: 0 additions & 7 deletions bitsandbytes/backends/xpu/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ def _dequantize_4bit_impl(
def _dequantize_blockwise_impl(
A: torch.Tensor, absmax: torch.Tensor, code: torch.Tensor, blocksize: int, dtype: torch.dtype, out: torch.Tensor
) -> None:
# torch._check(blocksize in [4096, 2048, 1024, 512, 256, 128, 64])
# torch._check(A.dtype == torch.uint8, lambda: f"A must be uint8, got {A.dtype}")
# torch._check(
# dtype in [torch.float16, torch.bfloat16, torch.float32],
# lambda: f"Blockwise dequantization only supports 16bit/32bit floating types, got {dtype}",
# )

args = (
get_ptr(code),
get_ptr(A),
Expand Down
20 changes: 6 additions & 14 deletions docs/source/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,16 @@ pip install -e . # `-e` for "editable" install, when developing BNB (otherwise

#### Intel CPU + XPU


If you are using Intel CPU on Linux or Intel XPU on Linux/Windows, please follow the [instruction](https://pytorch-extension.intel.com/) or the following command to install intel_extension_for_pytorch so you can get better performance.

CPU: `pip install intel_extension_for_pytorch`
XPU: `pip install intel_extension_for_pytorch --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/`

Install bitsandbytes:
CPU: Need to build CPU C++ codes
CPU needs to build CPU C++ codes, while xpu needs to build sycl codes.
Run `export bnb_device=xpu` if you are using xpu, run `export bnb_device=cpu` if you are using cpu.
```
git clone https://github.com/bitsandbytes-foundation/bitsandbytes.git && cd bitsandbytes/
cmake -DCOMPUTE_BACKEND=cpu -S .
cmake -DCOMPUTE_BACKEND=$bnb_device -S .
make
pip install .
```
XPU:
```
pip install git+https://github.com/bitsandbytes-foundation/bitsandbytes.git
pip install -e .
```
Note: You can run `pip install intel_extension_for_pytorch to get better performance on CPU`


</hfoption>
<hfoption id="Ascend NPU">
Expand Down