Skip to content

Commit

Permalink
[BUG] Make sure the torch tensor is contiguous (#34)
Browse files Browse the repository at this point in the history
* update bitblas

* Merge branch 'main' of https://github.com/microsoft/BitBLAS into main

* make sure weight is contiguous.
  • Loading branch information
LeiWang1999 authored May 3, 2024
1 parent a157dc4 commit 9059fc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/bitblas/ops/general_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ def transform_weight(self, weight, scale=None, zeros=None, bias=None):
Returns:
A list containing the transformed weight tensor and optionally the scale, zeros, and bias.
"""
weight = weight.contiguous()
if self.W_dtype == self.A_dtype:
if self.weight_transform is not None:
return self.weight_transform(weight.cpu()).cuda().contiguous()
Expand Down

0 comments on commit 9059fc4

Please sign in to comment.