Skip to content

Commit 87f4627

Browse files
committed
chore: add break
1 parent e7f8c09 commit 87f4627

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py/torch_tensorrt/dynamo/_exporter.py

+2
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ def lift(gm: torch.fx.GraphModule, graph_signature: Any) -> torch.fx.GraphModule
112112
if node.target == name:
113113
input_kind = InputKind.PARAMETER
114114
state_dict[name] = constant_tensor
115+
break
115116
for name, _ in gm.named_buffers():
116117
if node.target == name:
117118
input_kind = InputKind.BUFFER
118119
state_dict[name] = constant_tensor
120+
break
119121

120122
# Replace get_attr nodes with placeholder nodes and copy metadata.
121123
with gm.graph.inserting_before(first_user_input):

0 commit comments

Comments
 (0)