🐛 [Bug] Torch-TRT has more Reformatting than ONNX-TRT
Open
@zewenli98 is already working on this.
Since Jul 29, 2025.
bug
story: Performance & Benchmarking
- Dominant language
- Python
- Stars
- 3k
- Forks
- 410
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 78
Description
Bug Description
Torch-TRT has more Reformatting than ONNX-TRT, which affects perf. For example:
, { "name" : "Reformatting CopyNode for Input Tensor 1 to [CONVOLUTION]-[aten_ops.convolution.default]-[model.0.residual/convolution] + [ELEMENTWISE]-[aten_ops.add.Tensor]-[model.0/add]", "timeMs" : 2.19312, "averageMs" : 0.0190706, "medianMs" : 0.01872, "percentage" : 0.183659 }
, { "name" : "Reformatting CopyNode for Input Tensor 1 to PWN([PARAMETRIC_RELU]-[aten_ops._prelu_kernel.default]-[model.1.submodule.0.conv.unit0.adn.A/_prelu_kernel_2])", "timeMs" : 1.1616, "averageMs" : 0.0101009, "medianMs" : 0.003072, "percentage" : 0.0972762 }
, { "name" : "Reformatting CopyNode for Input Tensor 1 to PWN([PARAMETRIC_RELU]-[aten_ops._prelu_kernel.default]-[model.1.submodule.0.conv.unit1.adn.A/_prelu_kernel_3])", "timeMs" : 0.3312, "averageMs" : 0.00288, "medianMs" : 0.003072, "percentage" : 0.0277357 }
, { "name" : "Reformatting CopyNode for Input Tensor 1 to [CONVOLUTION]-[aten_ops.convolution.default]-[model.1.submodule.0.residual/convolution_3] + [ELEMENTWISE]-[aten_ops.add.Tensor]-[model.1.submodule.0/add_1]", "timeMs" : 0, "averageMs" : 0, "medianMs" : 0, "percentage" : 0 }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.