Upgrade perf_run script to support TRT 10 and fix some issues#3650
Merged
Upgrade perf_run script to support TRT 10 and fix some issues#3650
Conversation
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2025-07-17 21:15:44.135432+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2025-07-17 21:16:11.238491+00:00
@@ -3596,6 +3596,6 @@
SourceIR.ATEN,
name,
input=args[0],
weight=args[1],
bias=args_bounds_check(args, 2, None),
- )
\ No newline at end of file
+ )
--- /home/runner/work/TensorRT/TensorRT/tools/perf/perf_run.py 2025-07-17 21:15:44.172433+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/perf/perf_run.py 2025-07-17 21:16:16.387016+00:00
@@ -776,11 +776,13 @@
raise ValueError(
"No valid models specified. Please provide a torchscript model file or model name (defined in hub.py) or model_hf name in huggingface models "
)
backends = parse_backends(params["backends"])
- if any(backend in ["dynamo", "torch_compile", "tensorrt"] for backend in backends) and (model_torch is None):
+ if any(
+ backend in ["dynamo", "torch_compile", "tensorrt"] for backend in backends
+ ) and (model_torch is None):
raise ValueError(
"No Pytorch model (nn.Module) is provided for torchdynamo compilation. Please provide a pytorch model using --model_torch argument"
)
batch_size = params["batch_size"]
peri044
reviewed
Jul 17, 2025
Collaborator
peri044
left a comment
There was a problem hiding this comment.
- remove lower_linear
- consider try/catch for onnx export
- Update perf_run readme with the latest arguments
- Run llm example with the constant_folding to test accuracy
peri044
reviewed
Jul 17, 2025
Collaborator
peri044
left a comment
There was a problem hiding this comment.
modify the start timer to include creation of input bindings as well in run_tensorrt
HolyWu
reviewed
Jul 18, 2025
HolyWu
reviewed
Jul 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
optimization_levelarg and set highest optimization 3 as defaultFixes #3634
Type of change
Checklist: