Skip to content

Commit 3900187

Browse files
Update ops.py
Fix lint issue
1 parent 805fb6b commit 3900187

File tree

1 file changed

+2
-1
lines changed
  • bitsandbytes/backends/hpu

1 file changed

+2
-1
lines changed

bitsandbytes/backends/hpu/ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def _(
2121
torch._check_is_size(blocksize)
2222
torch._check(quant_type == "nf4", lambda: f"quant_type must be nf4, got {quant_type}")
2323
torch._check(
24-
dtype in (torch.bfloat16, torch.float32), lambda: f"4bit dequantization only bf16/f32, but got {dtype}"
24+
A.dtype in [torch.bfloat16, torch.uint8],
25+
lambda: f"quant_storage supports uint8 or bfloat16, but got {A.dtype}",
2526
)
2627
torch._check(A.dtype in [torch.bfloat16, torch.uint8], lambda: f"quant_storage supports uint8 or bfloat16, but got {A.dtype}")
2728

0 commit comments

Comments
 (0)