Skip to content

Commit 697bd02

Browse files
committed
Resolve dangerous default value [] as argument
1 parent b5cf706 commit 697bd02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bitsandbytes/autograd/_functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ def get_current_outlier_idx(self):
5050

5151
class MatMul8bit(torch.autograd.Function):
5252
@staticmethod
53-
def forward(ctx, A, B, out=None, quant_type="vector", precision=[8, 8, 8]):
54-
53+
def forward(ctx, A, B, out=None, quant_type="vector", precision=None):
54+
if precision is None:
55+
precision = [8, 8, 8]
5556
if precision[0] != 8:
5657
with torch.no_grad():
5758
output = torch.matmul(A, B)

0 commit comments

Comments
 (0)