From f6978ae2a22652465a36b4ad85bb5f6b5ca97e77 Mon Sep 17 00:00:00 2001 From: Tom Aarsen Date: Thu, 27 Oct 2022 13:16:53 +0200 Subject: [PATCH] Fix critical bug in histogram_scatter_add_2d: Undefined variable --- bitsandbytes/functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitsandbytes/functional.py b/bitsandbytes/functional.py index f6bd2be..4e21314 100644 --- a/bitsandbytes/functional.py +++ b/bitsandbytes/functional.py @@ -959,7 +959,7 @@ def histogram_scatter_add_2d( maxdim1 = ct.c_int32(histogram.shape[0]) n = ct.c_int32(index1.numel()) - is_on_gpu([histogram, index1, index2d, source]) + is_on_gpu([histogram, index1, index2, source]) lib.chistogram_scatter_add_2d(get_ptr(histogram), get_ptr(index1), get_ptr(index2), get_ptr(source), maxdim1, n) def check_matmul(A, B, out, transposed_A, transposed_B, expected_type=torch.int8):