Supported Model Signatures¶
The following pages explores many kind of signatures for a forward method and how they translate into ONNX when they can. The results are summarized by the following pages. It tries model taking tensors, list of tensors, integers or floats. It also tries tests and loops.
Tested Scenarios¶
jit: tries to capture the graph by using
torch.jit
jit-decall: tries to capture the graph by using
torch.jit
then applies decompositionsnostrict: call
torch.export.export(..., strict=False)()
nostrict-decall: call
torch.export.export(..., strict=False)()
, then applies decompositionsstrict: call
torch.export.export(..., strict=True)()
strict-decall: call
torch.export.export(..., strict=True)()
, then applies decompositionstracing: trace the execution of the model, it does flatten list, dictionaries or custom classes but the graph does not always produce aten function.
And for ONNX:
custom-fallback: tries to export with different sceanrios then to convert into ONNX with the custom exporter
custom-tracing: traces the model and then converts into ONNX with the custom exporter
dynamo-ir: calls
torch.onnx.export(..., dynamo=True)()
and then optimizes the modelscript: calls
torch.onnx.export(..., dynamo=False)()