-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: onnxRelated to torch.onnxRelated to torch.onnxonnx-triagedtriaged by ONNX teamtriaged by ONNX teamtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
torch.onnx.export fallback to torchscript graph when dynamo exporting fails:
pytorch/torch/onnx/__init__.py
Line 157 in 24c9683
| fallback: bool = False, |
However, users typically does not provide both dynamic_shapes (for torch.onnx.export(..., dynamo=True)) and dynamic_axes (torch.onnx.export(..., dynamo=False)) at the same time. A conversion from dynamic_shapes to dynamic axes is needed to improve fallback user experience.
pytorch/torch/onnx/__init__.py
Line 150 in 24c9683
| dynamic_shapes: dict[str, Any] | tuple[Any, ...] | list[Any] | None = None, |
pytorch/torch/onnx/__init__.py
Lines 143 to 145 in 24c9683
| dynamic_axes: Mapping[str, Mapping[int, str]] | |
| | Mapping[str, Sequence[int]] | |
| | None = None, |
cc @xadupre
Metadata
Metadata
Assignees
Labels
module: onnxRelated to torch.onnxRelated to torch.onnxonnx-triagedtriaged by ONNX teamtriaged by ONNX teamtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module