diff --git a/backends/cadence/aot/quantizer/TARGETS b/backends/cadence/aot/quantizer/TARGETS new file mode 100644 index 00000000000..cb7ef163e85 --- /dev/null +++ b/backends/cadence/aot/quantizer/TARGETS @@ -0,0 +1,49 @@ +load("@fbcode_macros//build_defs:python_library.bzl", "python_library") + +oncall("odai_jarvis") + +python_library( + name = "utils", + srcs = [ + "utils.py", + ], + deps = [ + "//caffe2:torch", + ], +) + +python_library( + name = "patterns", + srcs = [ + "patterns.py", + ], + deps = [ + ":utils", + "//caffe2:torch", + ], +) + +python_library( + name = "quantizer", + srcs = [ + "quantizer.py", + ], + deps = [ + ":patterns", + ":utils", + "//caffe2:torch", + ], +) + +python_library( + name = "fusion_pass", + srcs = [ + "fusion_pass.py", + ], + deps = [ + ":patterns", + ":utils", + "//caffe2:torch", + "//executorch/exir:pass_base", + ], +) diff --git a/backends/cadence/aot/quantizer/fusion_pass.py b/backends/cadence/aot/quantizer/fusion_pass.py index 69b12cf7a97..52e1d148cfd 100644 --- a/backends/cadence/aot/quantizer/fusion_pass.py +++ b/backends/cadence/aot/quantizer/fusion_pass.py @@ -167,7 +167,7 @@ def get_args_and_kwargs_matmul( inputs_inputs: List[fx.Node], dequants_inputs: List[fx.Node], quant_node: fx.Node, -) -> Tuple[Tuple[Any], Dict[str, Any]]: +) -> Tuple[Tuple[Any, ...], Dict[str, Any]]: requantize_scale = ( # pyre-ignore[58]: Unsupported operand dequants_inputs[0].args[1] diff --git a/backends/cadence/aot/quantizer/patterns.py b/backends/cadence/aot/quantizer/patterns.py index 6df27982585..e403ac9d2ac 100644 --- a/backends/cadence/aot/quantizer/patterns.py +++ b/backends/cadence/aot/quantizer/patterns.py @@ -217,7 +217,6 @@ def get_anchors(self, gm, fused_partition) -> PartitionAnchors: weights=[], biases=[], # Ordering: normalized_shape, weights, bias - # pyre-fixme[6]: Incompatible parameter type others=others, output=[(layer_norm_node,)], )