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:
placeholder
: Represents a module input, maps to an ONNX graph input.call_module
: Symbolizes a call to a submodule, maps to an ONNXcall_method
: Symbolizes a method call. Not yet implemented.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.get_attr
: Indicates an attribute access within the current module. Maps to an ONNX graph initializer.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
.