Hi @zetyquickly,

Could you please describe what does it mean?

This concept is introduced in the documentation: torch.fx — PyTorch 1.8.0 documentation 52. FX produces valid Python nn.Module instances from its Graph representation

Why does one need to translate Python to Python?

FX emphasizes generating Python code so that it can be used within the existing PyTorch eager ecosystem. That is to say, code transformed by FX is not locked into one specific runtime (e.g. TorchScript) and all the normal tooling that can be used with normal PyTorch modules can be used with FX-generated modules.

Is IR the same IR that we acquire during jit.trace ?

No, the IR is not the same as that produced by jit.trace, intentionally so. FX is an entirely separate system that is superior to jit.trace in several ways:

FX deeply integrates into the Python runtime, so it can better acquire accurate program representations, whereas jit.trace often silently captures wrong representations
FX’s Graph IR is much simpler since it represents the code at a higher level (torch.nn module calls are preserved rather than traced through). This is much easier to work with and understand and we have seen major productivity improvements using this IR