Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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: 5 additions & 0 deletions bitsandbytes/cextension.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def __init__(self, lib: ct.CDLL):


def get_native_library() -> BNBNativeLibrary:
from bitsandbytes.backends.cpu_xpu_common import ipex_cpu, ipex_xpu

if ipex_cpu or ipex_xpu:
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type annotation for this function does not indicate it could ever return None.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for I forgot to remove return None in this function. Now, it's okay.


binary_path = PACKAGE_DIR / f"libbitsandbytes_cpu{DYNAMIC_LIBRARY_SUFFIX}"
cuda_specs = get_cuda_specs()
if cuda_specs:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ pip install -e . # `-e` for "editable" install, when developing BNB (otherwise
</hfoption>
<hfoption id="Intel CPU + GPU">

#### Intel CPU
#### Intel CPU / XPU

> [!TIP]
> Intel CPU backend only supports building from source; for now, please follow the instructions below.
> Intel CPU / XPU backend only supports building from source; for now, please follow the instructions below.

Similar to the CUDA case, you can compile bitsandbytes from source for Linux and Windows systems.

Expand Down