torch.export
A model export API introduced in PyTorch 2.x that converts models into a portable computational graph representation, producing a static ExportedProgram containing the computational graph, parameters and metadata. It supports dynamic shape information and subsequent compiler optimization.
Timeline (last 90 days)
torch.export is responsible for exporting PyTorch models to ExecuTorch-specific .pte files, a file format that is the standard carrier for the ExecuTorch runtime and contains the model's computation graph and weight information.
torch.export is a model export API introduced in PyTorch 2.x, used to convert models into a portable computation graph representation, generating a static ExportedProgram that contains the computation graph, parameters, and metadata.
Compared with the earlier TorchScript, torch.export provides a stricter graph capture mechanism, better preserves dynamic shape information, and supports subsequent compiler optimizations.
ExecuTorch adopts a layered architecture: the frontend receives the graph exported by torch.export, goes through graph optimization and operator decomposition, and ultimately the backend (such as XNNPACK, Core ML, Vulkan, WebGPU) is responsible for kernel execution.
ExecuTorch introduces a unified intermediate representation, EXIR; models are exported to EXIR via torch.export, then packaged in the .pte format and handed to the runtime for execution.
The ExecuTorch workflow consists of three phases: exporting the model computation graph with torch.export, performing quantization and optimization through compiler passes, and finally packaging into the .pte format to run on the target device.
All Facts (6)
torch.export is responsible for exporting PyTorch models to ExecuTorch-specific .pte files, a file format that is the standard carrier for the ExecuTorch runtime and contains the model's computation graph and weight information.
50%Unverifiedtorch.export is a model export API introduced in PyTorch 2.x, used to convert models into a portable computation graph representation, generating a static ExportedProgram that contains the computation graph, parameters, and metadata.
50%UnverifiedCompared with the earlier TorchScript, torch.export provides a stricter graph capture mechanism, better preserves dynamic shape information, and supports subsequent compiler optimizations.
50%UnverifiedExecuTorch adopts a layered architecture: the frontend receives the graph exported by torch.export, goes through graph optimization and operator decomposition, and ultimately the backend (such as XNNPACK, Core ML, Vulkan, WebGPU) is responsible for kernel execution.
50%UnverifiedExecuTorch introduces a unified intermediate representation, EXIR; models are exported to EXIR via torch.export, then packaged in the .pte format and handed to the runtime for execution.
50%UnverifiedThe ExecuTorch workflow consists of three phases: exporting the model computation graph with torch.export, performing quantization and optimization through compiler passes, and finally packaging into the .pte format to run on the target device.
50%