Skip to content

Commit 883d693

Browse files
authored
fix logs (#12)
* fix logs Signed-off-by: jiqing-feng <[email protected]> * fix format Signed-off-by: jiqing-feng <[email protected]> --------- Signed-off-by: jiqing-feng <[email protected]>
1 parent dc75ad8 commit 883d693

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

bitsandbytes/backends/cpu/ops.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def _(A: torch.Tensor, B: torch.Tensor):
2626

2727

2828
if not isinstance(lib, ErrorHandlerMockBNBNativeLibrary):
29-
logger.info("Loading C++ bitsandbytes kernels for CPU")
3029

3130
@register_kernel("bitsandbytes::quantize_blockwise", "cpu")
3231
def _(A: torch.Tensor, code: torch.Tensor, blocksize: int) -> tuple[torch.Tensor, torch.Tensor]:
@@ -100,5 +99,3 @@ def _(
10099
out = out.reshape(A.shape)
101100

102101
return out
103-
else:
104-
logger.warning("Loading pytorch bitsandbytes kernels for CPU because no native library found.")

bitsandbytes/backends/xpu/ops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _gemv_4bit_impl(
137137

138138
# SYCL should be faster for xpu, so at first checking if it is available.
139139
if not isinstance(lib, ErrorHandlerMockBNBNativeLibrary):
140-
logger.info("Loading sycl bitsandbytes kernels for XPU")
140+
logger.info("Register sycl bitsandbytes kernels for XPU")
141141

142142
@register_kernel("bitsandbytes::dequantize_4bit", "xpu")
143143
def _(
@@ -204,7 +204,7 @@ def _(
204204
torch._check(out.dtype == A.dtype, lambda: f"Expected out.dtype == {A.dtype}, got {out.dtype}")
205205
_gemv_4bit_impl(A, B, shapeB, absmax, code, blocksize, out=out)
206206
elif triton_available:
207-
logger.info("Loading triton bitsandbytes kernels for XPU")
207+
logger.info("Register triton bitsandbytes kernels for XPU")
208208
from ..triton import ops as triton_ops
209209

210210
register_kernel("bitsandbytes::quantize_blockwise", "xpu")(triton_ops.quantize_blockwise)
@@ -215,4 +215,4 @@ def _(
215215
register_kernel("bitsandbytes::dequantize_4bit", "xpu")(triton_ops.dequantize_4bit)
216216
register_kernel("bitsandbytes::gemv_4bit", "xpu")(triton_ops.gemv_4bit)
217217
else:
218-
logger.warning("Loading pytorch bitsandbytes kernels for XPU because no native library or triton packages found.")
218+
logger.warning("Register pytorch bitsandbytes kernels for XPU because no native library or triton packages found.")

0 commit comments

Comments
 (0)