Skip to content

Commit

Permalink
Fix igemmlt correctness issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Xia-Weiwen committed Apr 15, 2024
1 parent 77be40b commit 8d0b695
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bitsandbytes/backends/cpu_xpu_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d0b695

Please sign in to comment.