File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
bitsandbytes/backends/xpu Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 9
9
# With default torch, error:
10
10
# NotImplementedError: The operator 'aten::_int_mm' for XPU
11
11
if ipex_xpu and torch .__version__ >= (2 , 7 ):
12
+
12
13
@register_kernel ("bitsandbytes::int8_linear_matmul" , "xpu" )
13
14
def _ (A : torch .Tensor , B : torch .Tensor ):
14
15
return torch ._int_mm (
@@ -18,6 +19,7 @@ def _(A: torch.Tensor, B: torch.Tensor):
18
19
19
20
20
21
if ipex_xpu :
22
+
21
23
@register_kernel ("bitsandbytes::dequantize_nf4_ipex" , "xpu" )
22
24
def _ (
23
25
A : torch .Tensor ,
Original file line number Diff line number Diff line change 4
4
import torch
5
5
6
6
import bitsandbytes
7
- from bitsandbytes .functional import ipex_cpu , ipex_xpu
7
+ from bitsandbytes .functional import ipex_xpu
8
8
from tests .helpers import TRUE_FALSE , get_available_devices , id_formatter
9
9
10
10
# torch.library.opcheck is only available in torch 2.4 and later.
You can’t perform that action at this time.
0 commit comments