fix the llm test failing issue + add back cu126/cu128#4118
Merged
lanluo-nvidia merged 3 commits intorelease/2.11from Mar 5, 2026
Merged
fix the llm test failing issue + add back cu126/cu128#4118lanluo-nvidia merged 3 commits intorelease/2.11from
lanluo-nvidia merged 3 commits intorelease/2.11from
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/lowering/passes/_FakeTensorUpdater.py 2026-03-05 18:38:18.298241+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/_FakeTensorUpdater.py 2026-03-05 18:38:55.444799+00:00
@@ -18,10 +18,11 @@
from torch.utils._ordered_set import OrderedSet
# Try to import reinplace module - may not be available in all PyTorch builds
try:
import importlib
+
reinplace_module = importlib.import_module("torch._inductor.fx_passes.reinplace")
_generalized_scatter = getattr(reinplace_module, "_generalized_scatter", None)
except Exception:
_generalized_scatter = None
@@ -165,11 +166,14 @@
# or operator.getitem which is used when returning multiple
# tensors from an op.
return node.op == "call_function" and (
isinstance(node.target, torch._ops.OpOverload)
or node.target is operator.getitem
- or (_generalized_scatter is not None and node.target is _generalized_scatter)
+ or (
+ _generalized_scatter is not None
+ and node.target is _generalized_scatter
+ )
)
to_process = OrderedSet[int]()
for node in self.graph.nodes:
# NB: Be very careful about skipping nodes (via continues) hereThere 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/lowering/passes/_FakeTensorUpdater.py 2026-03-05 20:28:58.533773+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/_FakeTensorUpdater.py 2026-03-05 20:29:32.293886+00:00
@@ -18,10 +18,11 @@
from torch.utils._ordered_set import OrderedSet
# Try to import reinplace module - may not be available in all PyTorch builds
try:
import importlib
+
reinplace_module = importlib.import_module("torch._inductor.fx_passes.reinplace")
_generalized_scatter = getattr(reinplace_module, "_generalized_scatter", None)
except Exception:
_generalized_scatter = None
@@ -165,11 +166,14 @@
# or operator.getitem which is used when returning multiple
# tensors from an op.
return node.op == "call_function" and (
isinstance(node.target, torch._ops.OpOverload)
or node.target is operator.getitem
- or (_generalized_scatter is not None and node.target is _generalized_scatter)
+ or (
+ _generalized_scatter is not None
+ and node.target is _generalized_scatter
+ )
)
to_process = OrderedSet[int]()
for node in self.graph.nodes:
# NB: Be very careful about skipping nodes (via continues) here
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
AttributeError: module 'torch._inductor.fx_passes' has no attribute 'reinplace'
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: