pytorch
pytorch copied to clipboard
Refactor lowering code by merging static and dynamic pattern matching
Following https://github.com/pytorch/pytorch/pull/74128 and https://github.com/pytorch/pytorch/pull/74362, this would be part 3 of the effort to reduce code duplication in the code that lowers reference quantized patterns to native quantized ops in fbgemm/qnnpack. Although there is already a common pattern matching helper function for static patterns, there is not one for dynamic patterns, and the code there looks similar in many ways. We should try to merge the static and dynamic pattern matching code as much as possible.