fix(test): enable TRT-RTX refit and engine cache tests#4192
Open
tp5uiuc wants to merge 2 commits intopytorch:mainfrom
Open
fix(test): enable TRT-RTX refit and engine cache tests#4192tp5uiuc wants to merge 2 commits intopytorch:mainfrom
tp5uiuc wants to merge 2 commits intopytorch:mainfrom
Conversation
tp5uiuc
commented
Apr 16, 2026
Now that pytorch#4181 removed the RTX-specific batch norm workaround that bypassed constant folding, the refit bug (pytorch#3752) is resolved — eps constants are no longer created as separate CONSTANT layers on RTX. Remove the RTX skip decorators from: - test_dynamo_compile_with_refittable_weight_stripped_engine - test_dynamo_compile_with_custom_engine_cache - test_dynamo_compile_change_input_shape Keep the RTX skip on test_caching_small_model, which fails a timing assertion (cached compilation is slower than uncached on RTX). Update the skip message to reflect the actual reason. Fix import ordering in test_weight_stripped_engine.py: tensorrt must be imported after torch_tensorrt so the tensorrt_rtx module alias is resolved correctly. Fixes pytorch#3752
d39be11 to
fe174e7
Compare
Signed-off-by: tejaswinp <tejaswinp@nvidia.com>
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
Now that #4181 removed the RTX-specific batch norm workaround that bypassed constant folding, the refit bug (#3752) is resolved — eps constants are no longer created as separate CONSTANT layers on RTX.
This PR removes the RTX skip decorators from refit and engine cache tests that were previously disabled due to #3752, and fixes an import ordering issue in
test_weight_stripped_engine.py.Fixes #3752
Changes
test_dynamo_compile_with_refittable_weight_stripped_engine(test_weight_stripped_engine.py)test_dynamo_compile_with_custom_engine_cacheandtest_dynamo_compile_change_input_shape(test_engine_cache.py)test_caching_small_model— this test fails a timing assertion (cached compilation is slower than uncached on TRT-RTX). Updated the skip message to reflect the actual reason rather than referencing 🐛 [Bug] TensorRT-RTX Refitter test failed when constant fold is disabled #3752.test_weight_stripped_engine.py:import tensorrt as trtmust come afterimport torch_tensorrtso thetensorrt_rtxmodule alias is resolved. Added# isort: skipto prevent automated reordering.Type of change
Checklist: