Repository navigation
Skip TRTInterpreter.validate_conversion when partition already proved full support. - #4693
Merged
Merged
Conversation
micwill755
requested review from
cehongwang and
narendasan
and removed request for
zewenli98
September 8, 2026 22:38
6 of 9 tasks
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
September 9, 2026 22:54
c722fbb to
6339d3b
Compare
micwill755
force-pushed
the
network-construct
branch
from
September 9, 2026 22:55
6bf067a to
5c19a17
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
September 16, 2026 23:22
6339d3b to
caed6cf
Compare
micwill755
force-pushed
the
network-construct
branch
from
September 16, 2026 23:22
5c19a17 to
2f4ea21
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
September 16, 2026 23:23
caed6cf to
141e926
Compare
micwill755
force-pushed
the
network-construct
branch
from
September 16, 2026 23:23
2f4ea21 to
9ea49e1
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
September 29, 2026 17:44
141e926 to
7762e49
Compare
micwill755
force-pushed
the
network-construct
branch
from
September 29, 2026 17:44
9ea49e1 to
4373c3c
Compare
cehongwang
reviewed
Sep 30, 2026
| input_binding_names: Optional[Sequence[str]] = None, | ||
| output_binding_names: Optional[Sequence[str]] = None, | ||
| _debugger_config: Optional[DebuggerConfig] = None, | ||
| skip_conversion_validation: bool = False, |
Collaborator
There was a problem hiding this comment.
Consider set default to True if majority of time we don't need the validation?
Collaborator
Author
There was a problem hiding this comment.
We should leave the default False. We only skip it inside compile_module, after that function has already confirmed every op has a converter. If the default were True, every other caller would skip the check too, even when nobody has confirmed that.
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 6, 2026 20:38
7762e49 to
949a239
Compare
micwill755
force-pushed
the
network-construct
branch
from
October 6, 2026 20:49
4373c3c to
4aba7b0
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 6, 2026 21:34
949a239 to
78b03f6
Compare
micwill755
force-pushed
the
network-construct
branch
from
October 6, 2026 21:34
4aba7b0 to
9ad1869
Compare
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/impl/moe.py 2026-10-06 21:35:02.978349+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/impl/moe.py 2026-10-06 21:35:33.188930+00:00
@@ -94,11 +94,13 @@
ctx, offs, torch.int32, f"{name}_offs_i32", target, source_ir
)
offs_row = impl.shuffle.reshape(
ctx, target, source_ir, f"{name}_offs_row", offs_i32, (1, -1)
)
- passed = impl.elementwise.le(ctx, target, source_ir, f"{name}_passed", offs_row, rows)
+ passed = impl.elementwise.le(
+ ctx, target, source_ir, f"{name}_passed", offs_row, rows
+ )
group = impl.reduce.sum(
ctx,
target,
source_ir,
f"{name}_group",
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2026-10-06 21:35:02.976781+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2026-10-06 21:35:36.927809+00:00
@@ -4640,13 +4640,11 @@
if key in kwargs and kwargs[key] is not None:
return kwargs[key]
return args_bounds_check(args, index, default)
-def histc_validator(
- node: Node, settings: Optional[CompilationSettings] = None
-) -> bool:
+def histc_validator(node: Node, settings: Optional[CompilationSettings] = None) -> bool:
bins = _arg_or_kwarg(node.args, node.kwargs, 1, "bins", 100)
lo = _arg_or_kwarg(node.args, node.kwargs, 2, "min", 0)
hi = _arg_or_kwarg(node.args, node.kwargs, 3, "max", 0)
if not all(
isinstance(v, (int, float)) and not isinstance(v, bool) for v in (bins, lo, hi)
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 13, 2026 19:06
78b03f6 to
1e45324
Compare
micwill755
force-pushed
the
network-construct
branch
3 times, most recently
from
October 13, 2026 22:09
79542fa to
d05a422
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 13, 2026 23:12
a6afa53 to
c693a4b
Compare
micwill755
force-pushed
the
network-construct
branch
from
October 13, 2026 23:12
d05a422 to
9345e9d
Compare
micwill755
force-pushed
the
network-construct
branch
from
October 13, 2026 23:41
9345e9d to
b61b0d7
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 13, 2026 23:41
c693a4b to
7a6ca3d
Compare
… full support. compile_module already walks CONVERTERS via get_graph_converter_support. Under require_full_compilation with a complete count, the extra get() pass in interpreter __init__ cannot find missing ops, so skip it.
The flag was accepted by interpret_module_to_result but never handed to the helper that reads it, so engine builds raised NameError.
micwill755
force-pushed
the
network-construct
branch
from
October 13, 2026 23:51
b61b0d7 to
37264fb
Compare
micwill755
force-pushed
the
skip-conversion-recompile
branch
from
October 13, 2026 23:51
7a6ca3d to
0693ab4
Compare
micwill755
added a commit
that referenced
this pull request
Oct 20, 2026
micwill755
added a commit
that referenced
this pull request
Nov 20, 2026
8 of 11 tasks
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.
Summary
TRTInterpreter.validate_conversion()whencompile_modulealready proved full converter coverage (require_full_compilationandnum_supported_ops == total_ops).__init__walk is a secondCONVERTERS.get()over everycall_function/call_method/call_modulenode. Partition already did the same lookup viaget_graph_converter_support. Under full compilation a missing-op warning cannot fire, so the extra pass is redundant.interpret_module_to_result/ engine-converter / test-harness construction still validates (defaultskip_conversion_validation=False). Construct stillCONVERTERS.gets per node when it converts.interpreter.validate_conversion0.102s → 0s.PR 9 of the compile-startup stack; based on #4599.
Type of change
Test plan
torchtrt-213rc10): skip-offvalidate_conversion0.102s; skip-on the hook does not run. Engine still builds; steady ~0.43s.__init__skipsvalidate_conversionwhen the flag is set, and still warns when it is notChecklist
Stack created with GitHub Stacks CLI • Give Feedback 💬