Shortcuts

FXE0008:fx-node-to-onnx

This diagnostic tracks the transformation process from an FX Node to ONNX Operators.

The process of converting FX Node to ONNX Node involves dealing with six distinct node types:

  1. placeholder: Represents a module input, maps to an ONNX graph input.

  2. call_module: Symbolizes a call to a submodule, maps to an ONNX

  3. call_method: Symbolizes a method call. Not yet implemented.

  4. call_function: Symbolizes a function call. Core ATen is expected as the function call target. The mapping from ATen to ONNX is implemented by ONNXScript torchlib. This guide shows how to write and register a custom symbolic function for call_function FX node.

  5. get_attr: Indicates an attribute access within the current module. Maps to an ONNX graph initializer.

  6. output: Represents the module’s output. Maps to an ONNX graph output.

For a granular understanding of how each node type is transformed, refer to the implementation details in FxOnnxInterpreter.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources