feat: support in-place plugins#4279
Open
bowang007 wants to merge 2 commits into
Open
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/unfunctionalize_qdp_inplace.py 2026-05-20 14:19:18.477550+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/unfunctionalize_qdp_inplace.py 2026-05-20 14:19:37.985186+00:00
@@ -131,13 +131,11 @@
gm.graph.erase_node(user)
else:
return_getitems: List[Any] = []
with gm.graph.inserting_after(new_call):
for i in range(n_outputs):
- g = gm.graph.call_function(
- operator.getitem, args=(new_call, i)
- )
+ g = gm.graph.call_function(operator.getitem, args=(new_call, i))
if isinstance(hop_val, tuple) and i < len(hop_val):
g.meta["val"] = hop_val[i]
return_getitems.append(g)
for user in getitem_users:
idx = user.args[1]
narendasan
reviewed
May 20, 2026
Collaborator
There was a problem hiding this comment.
Can you explain this lowering pass? Auto functionalization is a bit more broader reaching that just for QDP nodes. Maybe it might be useful elsewhere?
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
End-to-end support for in-place QDP plugins in torch-tensorrt
Fixes #4240
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: