From 235ff6d0c97214ddc3eb214882ddfffcd54a8560 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Sun, 14 Jul 2024 21:43:33 -0700 Subject: [PATCH] specify output type as torch backend contract form --- tools/aot/torch_exporter_harness.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/aot/torch_exporter_harness.py b/tools/aot/torch_exporter_harness.py index c30060e7..d59c3307 100644 --- a/tools/aot/torch_exporter_harness.py +++ b/tools/aot/torch_exporter_harness.py @@ -48,6 +48,11 @@ def main(): *loader_result.inputs, # unpack list of input tensors dynamic_shapes=loader_result.dynamic_shapes, import_symbolic_shape_expressions=True, + # This is the Torch dialect imported from Dynamo/FX export and run + # through `torchdynamo-export-to-torch-backend-pipeline` (which + # runs `ReduceOpVariantsPass` and `DecomposeComplexOpsPass`) to + # get it in a backend compliant form (aka torch backend contract). + output_type="torch", func_name=loader_result.func_name, )