Skip to content

Commit 33eafd2

Browse files
authored
[dlinfer] fix nn layout typo and scale t (#3915)
1 parent 13343af commit 33eafd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lmdeploy/pytorch/backends/dlinfer/qmodules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ def __init__(self,
2626

2727
def update_weights(self, weight: torch.Tensor, scale: torch.Tensor, bias: Optional[torch.Tensor] = None):
2828
"""Update weights."""
29-
if os.getenv('DLINER_LINEAR_USE_NN_LAYOUT', '0') == '1':
29+
if os.getenv('DLINFER_LINEAR_USE_NN_LAYOUT', '0') == '1':
3030
weight = weight.data.t().contiguous()
31+
scale = scale.data.t().contiguous()
3132
return weight, scale, bias
3233

3334
def forward(self,

0 commit comments

Comments
 (0)