From 868fd0fde5d8aea87fbb8af3736085ef18bd533b Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Thu, 24 Oct 2019 14:07:09 +0100 Subject: [PATCH] [Transform] remove deepcopy from give_unique_node_names --- src/finn/transformation/general.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/finn/transformation/general.py b/src/finn/transformation/general.py index 55bf899cf..0299f1388 100644 --- a/src/finn/transformation/general.py +++ b/src/finn/transformation/general.py @@ -1,12 +1,8 @@ -import copy - - def give_unique_node_names(model): """Give unique names to each node in the graph using enumeration.""" - new_model = copy.deepcopy(model) node_count = 0 - for n in new_model.graph.node: + for n in model.graph.node: n.name = "%s_%d" % (n.op_type, node_count) node_count += 1 # return model_was_changed = False as single iteration is always enough - return (new_model, False) + return (model, False) -- GitLab