pytorch / pytorch/TensorRT

🐛 [Bug] Torch-TRT has more Reformatting than ONNX-TRT

Open
#3,730 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.