Fix 4bit groupwise dynamic linear quantization (#2251)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/2251 This diff fixes following issues: - removes scales packing/unpacking - separate compute precision from scales storage precision, instead of maintaining activation/weight precision - defaults to fp32 everywhere unless specified otherwise. This is because atm groupwise quant kernels in xnnpack are for fp32. - Removes some dead code - Remove k tile constraints: These were from GPU and are not needed here - Replaces torch.ops.aten.linear with nn.functional.linear: This had to be done because otherwise delegation doesnt recognize the pattern. Yet another issue with pattern matching. ghstack-source-id: 217579450 exported-using-ghexport bypassing check because oss failures are unrelated bypass-github-export-checks Reviewed By: cccclai Differential Revision: D54427828 fbshipit-source-id: 634c34212e6ec80c41b21ae1dd1ad3211bf04862
K
Kimish Patel committed
34db73d72c4c8b9e2700e14f8723100cd78a7ade
Parent: bcba739
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 3/6/2024, 6:01:52 AM