Skip to content

Commit

Permalink
[tools/mec] Fix the node id error for const tensors
Browse files Browse the repository at this point in the history
The const tensor's id is currently 'Input_Node_ID + 0' must start
with 'Input_Node_ID + 1'.

ONE-DCO-1.0-Signed-off-by: Jonghwa Lee <[email protected]>
  • Loading branch information
batcheu committed Dec 2, 2024
1 parent e5d253d commit 7b3e445
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def build_graph(self, me_graph: graph_builder.Graph) -> None:
self.set_source_of(tensor_id=tensor_id, source_id=op_id, output_id=i)

# Create pseudo const node for orphan tensors (= const tensors)
for tensor_id, tensor in enumerate(sub_graph.tensors):
for tensor_id, tensor in enumerate(sub_graph.tensors, start=1):
if (self.get_source_of(tensor_id)) is None:
me_node = graph_builder.GraphNode(id=f'{input_id + tensor_id}',
label='pseudo_const',
Expand Down

0 comments on commit 7b3e445

Please sign in to comment.