Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Tars committed Dec 2, 2024
1 parent d1dc009 commit 5ac08ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/Python/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,17 @@ def _compiler(_gm: torch.fx.GraphModule, _inputs: List[torch.Tensor]):
param_nodes = []
buffers_nodes = []
input_nodes = []
other_nodes = []
for i, node in enumerate(_gm.graph.nodes):
if i in params_pos:
param_nodes.append(node)
elif i in buffers_pos:
buffers_nodes.append(node)
elif i in inputs_pos:
input_nodes.append(node)

gm_nodes = param_nodes + buffers_nodes + input_nodes
else:
other_nodes.append(node)
gm_nodes = param_nodes + buffers_nodes + input_nodes + other_nodes

for gm_node in gm_nodes:
node_users = []
Expand Down

0 comments on commit 5ac08ea

Please sign in to comment.