Skip to content

Commit

Permalink
Workaround: illegal memory access (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
casper-hansen committed Apr 6, 2024
1 parent b5db7fc commit f835379
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion awq/modules/linear/gemv_fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def from_linear(
@torch.no_grad()
def forward(self, x):
inputs = x
if inputs.numel() / inputs.shape[-1] < 8:
batch_size, n_tokens, _ = inputs.shape
if batch_size < 8 and n_tokens == 1:
out = awq_v2_ext.gemv_forward_cuda_decode(
inputs,
self.qweight,
Expand Down

0 comments on commit f835379

Please sign in to comment.