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
8 changes: 5 additions & 3 deletions bitsandbytes/backends/xpu/ops.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from collections.abc import Sequence
import warnings

from packaging import version
import torch

from ..._ops import register_kernel
from ..utils import ipex_xpu, triton_available

# _int_mm is available in torch starting from 2.7 version,
# but currently it's don't have xpu implementation.
if ipex_xpu and torch.__version__ >= (2, 7):
# _int_mm is available in torch starting from 2.9 version, or ipex 2.7
if version.parse(torch.__version__).release >= version.parse("2.9").release or (
ipex_xpu and torch.__version__ >= (2, 7)
):

@register_kernel("bitsandbytes::int8_linear_matmul", "xpu")
def _(A: torch.Tensor, B: torch.Tensor):
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ classifiers = [
]
dependencies = [
"torch>=2.2,<3",
"numpy>=1.17"
"numpy>=1.17",
"packaging>=20.9"
]

[project.urls]
Expand Down
Loading