Skip to content

Commit a306139

Browse files
larryliu0820malfet
authored andcommitted
Avoid using .view(dtype) because ExecuTorch doesn't have that op (#386)
Summary: As titled Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 7be5645 commit a306139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quantize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def forward(self, indices: torch.Tensor) -> torch.Tensor:
688688
weight_odd = self.weight.remainder(16)
689689
weight_unpacked = torch.stack((weight_even, weight_odd), dim=-1)
690690
weight = weight_unpacked.view(self.weight.shape[0], -1)
691-
weight = weight.view(torch.int8).add(-8)
691+
weight = weight.to(torch.int8).add(-8)
692692
else:
693693
weight = self.weight
694694

0 commit comments

Comments
 (0)