[torch.compile] Stop doing unnecessary FakeTensorProp in PiecewiseCompileInterpreter (#34093)

Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
Richard Zou
2026-02-10 19:15:40 -08:00
committed by GitHub
parent 3bcd494ef4
commit e30cedd44b
2 changed files with 41 additions and 4 deletions
+3 -1
View File
@@ -570,7 +570,9 @@ class PiecewiseCompileInterpreter(torch.fx.Interpreter): # type: ignore[misc]
) -> Any:
assert isinstance(target, str)
output = super().call_module(target, args, kwargs)
gm = getattr(self.module, target)
outputs = gm.graph.output_node().args[0]
output = fx.map_arg(outputs, lambda node: node.meta["example_value"])
if target in self.compile_submod_names:
index = self.compile_submod_names.index(target)