Skip to content

[6034518] Remove return statement preventing remote auto tuning#1361

Merged
gcunhase merged 3 commits intoNVIDIA:mainfrom
dthienan-nv:dmoodie/bugfix/remote_autoqdq
Apr 30, 2026
Merged

[6034518] Remove return statement preventing remote auto tuning#1361
gcunhase merged 3 commits intoNVIDIA:mainfrom
dthienan-nv:dmoodie/bugfix/remote_autoqdq

Conversation

@dthienan-nv
Copy link
Copy Markdown
Contributor

@dthienan-nv dthienan-nv commented Apr 28, 2026

What does this PR do?

Remove return statement from the code checking remote auto tuning config arguments since that results in skipping adding the actual remote tuning config to the trtexec cmd.

Root cause: The necessary flags do not get added to self._base_cmd.extend(trtexec_args) when remote autotuning is enabled.

Before fix:

['trtexec', '--avgRuns=100', '--iterations=100', '--warmUp=50', '--stronglyTyped', \
    '--saveEngine=engine.trt', '--timingCacheFile=trtexec_timing.cache', \
    '--onnx=baseline.onnx']

After fix:

['trtexec', '--avgRuns=100', '--iterations=100', '--warmUp=50', '--stronglyTyped', \
    '--saveEngine=engine.trt', '--timingCacheFile=trtexec_timing.cache', \
    '--remoteAutoTuningConfig=$CONFIG', '--safe', '--skipInference', \
    '--onnx=baseline.onnx']

Notice that the remote autotuning and related flags are now included in the trtexec command.

Related PR: #1259

Summary by CodeRabbit

Bug Fixes

  • Fixed an issue where remote autotuning configuration arguments were not being properly included in benchmark commands, ensuring all remote autotuning settings are now correctly applied during execution.

Signed-off-by: dmoodie <dmoodie@nvidia.com>
@dthienan-nv dthienan-nv requested a review from a team as a code owner April 28, 2026 15:38
@dthienan-nv dthienan-nv requested a review from gcunhase April 28, 2026 15:38
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 28, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The change removes an early return statement in TrtExecBenchmark.__init__ that was terminating constructor execution after ensuring --skipInference was included in trtexec_args. Execution now continues to append the modified arguments to the base command, enabling remote-autotuning configuration to be included in the final trtexec command.

Changes

Cohort / File(s) Summary
Remote Autotuning Control Flow
modelopt/onnx/quantization/autotune/benchmark.py
Removed early return statement in TrtExecBenchmark.__init__ to allow continued command assembly with remote-autotuning arguments after --skipInference validation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns ✅ Passed PR removes a return statement with no security vulnerabilities or anti-patterns introduced.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: removing a return statement that was preventing remote auto tuning functionality. This accurately reflects the primary purpose of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@gcunhase
Copy link
Copy Markdown
Contributor

/ok to test d816d70

@dthienan-nv dthienan-nv changed the title Remove over committed return statement preventing remote auto tuning Remove return statement preventing remote auto tuning Apr 28, 2026
@gcunhase gcunhase changed the title Remove return statement preventing remote auto tuning [6034518] Remove return statement preventing remote auto tuning Apr 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.93%. Comparing base (c07ac21) to head (ddba7e3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1361       +/-   ##
===========================================
+ Coverage   66.37%   76.93%   +10.56%     
===========================================
  Files         471      471               
  Lines       50487    50486        -1     
===========================================
+ Hits        33509    38842     +5333     
+ Misses      16978    11644     -5334     
Flag Coverage Δ
examples 41.58% <ø> (+0.93%) ⬆️
gpu 59.72% <ø> (+32.77%) ⬆️
unit 52.78% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gcunhase gcunhase enabled auto-merge (squash) April 29, 2026 17:39
@gcunhase
Copy link
Copy Markdown
Contributor

/ok to test 49299af

@gcunhase
Copy link
Copy Markdown
Contributor

/ok to test ddba7e3

@kevalmorabia97 kevalmorabia97 added the cherry-pick-0.44.0 After code freeze, cherry-pick to release branch for next rc (bulk update). Only for bug fixes / doc label Apr 30, 2026
@gcunhase gcunhase merged commit 378366b into NVIDIA:main Apr 30, 2026
58 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-0.44.0 After code freeze, cherry-pick to release branch for next rc (bulk update). Only for bug fixes / doc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants