From 8d0b695d8aadaa225b39352068a8dc7d999c4eae Mon Sep 17 00:00:00 2001 From: "Xia, Weiwen" Date: Mon, 15 Apr 2024 02:40:40 -0700 Subject: [PATCH] Fix igemmlt correctness issue --- bitsandbytes/backends/cpu_xpu_common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bitsandbytes/backends/cpu_xpu_common.py b/bitsandbytes/backends/cpu_xpu_common.py index e6bc59075..5be83d8e3 100644 --- a/bitsandbytes/backends/cpu_xpu_common.py +++ b/bitsandbytes/backends/cpu_xpu_common.py @@ -125,13 +125,9 @@ def igemmlt_impl( m = shapeA[0] elif dimsA == 3: m = shapeA[0] * shapeA[1] - if shapeA[-1] == shapeB[0]: - B = B.t() - shapeB = B.shape - else: - assert shapeA[-1] == shapeB[-1], f'Shapes of A and B do not match, got {shapeA} and {shapeB}' n = shapeB[0] k = shapeA[-1] + assert shapeA[-1] == shapeB[-1], f'Shapes of A and B do not match, got {shapeA} and {shapeB}' # if the tensor is empty, return a transformed empty tensor with the right dimensions if shapeA[0] == 0 and dimsA == 2: