Repository navigation
Defer FX graph stringification until DEBUG logging is enabled. - #4598
Merged
Merged
Conversation
4 tasks done
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 1, 2026 18:30
d844300 to
b61b68c
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 1, 2026 18:30
9529f21 to
2ab2bab
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 2, 2026 07:06
b61b68c to
cacfbc5
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 2, 2026 07:06
2ab2bab to
79252a6
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 9, 2026 22:54
cacfbc5 to
59fd02a
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 9, 2026 22:54
79252a6 to
963be70
Compare
micwill755
requested review from
cehongwang and
narendasan
and removed request for
lanluo-nvidia
September 10, 2026 17:22
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 16, 2026 23:22
59fd02a to
e35fac9
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 16, 2026 23:22
963be70 to
c174fe9
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 16, 2026 23:23
e35fac9 to
f0695ce
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 16, 2026 23:23
c174fe9 to
6034d33
Compare
micwill755
marked this pull request as ready for review
September 29, 2026 17:20
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
September 29, 2026 17:44
f0695ce to
8ccd56d
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
September 29, 2026 17:44
6034d33 to
c92404f
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
2 times, most recently
from
October 6, 2026 20:30
6daf644 to
90f8285
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 6, 2026 20:32
c92404f to
907decb
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
October 6, 2026 21:34
90f8285 to
79c54b0
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 6, 2026 21:34
907decb to
292ccf4
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:01.728929+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/impl/moe.py 2026-10-06 21:35:31.514190+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:01.727179+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2026-10-06 21:35:35.685667+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-aliased-fold-execute
branch
from
October 13, 2026 19:06
79c54b0 to
c778777
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
3 times, most recently
from
October 13, 2026 22:09
548f37f to
ae0c5d4
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
October 13, 2026 23:12
1565f07 to
b9d3040
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 13, 2026 23:12
ae0c5d4 to
c08fee9
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
October 13, 2026 23:41
b9d3040 to
eebd4de
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 13, 2026 23:41
c08fee9 to
216ddd1
Compare
micwill755
force-pushed
the
skip-aliased-fold-execute
branch
from
October 13, 2026 23:51
eebd4de to
98ad60b
Compare
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 13, 2026 23:51
216ddd1 to
3688b2c
Compare
logger.debug("..." + str(gm.graph)) and f-string graph dumps build the full graph even at INFO. Pass gm.graph as a %s argument so Graph.__str__ runs only when the line is emitted.
micwill755
force-pushed
the
lazy-graph-printing
branch
from
October 14, 2026 15:28
3688b2c to
286ea9f
Compare
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
logger.debugcall.logger.debug("…" + str(gm.graph))and f-string dumps runGraph.__str__even at INFO.gm.graphas a%sargument so Python logging formats it only when DEBUG is actually enabled.compile/refit/torch.compilebackend and the lowering passes that dumped the graph after each rewrite).PR 7 of the compile-startup stack; based on #4597.
Test plan
tests/py/dynamo/lowering/test_lazy_graph_printing.py(source scan for eagerstr(gm.graph)in dynamo debug logs;constant_folddoes not stringify at INFO and still does at DEBUG)Stack created with GitHub Stacks CLI • Give Feedback 💬