From 62e8b0aeb19599ef1621a2a9dbd1584da0245d95 Mon Sep 17 00:00:00 2001 From: auphelia <jakobapk@web.de> Date: Tue, 28 Jan 2020 15:13:28 +0000 Subject: [PATCH] [Resource Estimation - analysis pass] Changed dictionary keys to node names instead of node op type --- src/finn/analysis/fpgadataflow/res_estimation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/finn/analysis/fpgadataflow/res_estimation.py b/src/finn/analysis/fpgadataflow/res_estimation.py index 8004e2798..1693e413d 100644 --- a/src/finn/analysis/fpgadataflow/res_estimation.py +++ b/src/finn/analysis/fpgadataflow/res_estimation.py @@ -1,9 +1,10 @@ -import finn.custom_op.registry as registry import finn.core.utils as util +import finn.custom_op.registry as registry + def res_estimation(model): """Estimates the resources needed for the given model. - Returns {node op_type : resource estimation}""" + Returns {node name : resource estimation}""" res_dict = {} for node in model.graph.node: @@ -15,6 +16,6 @@ def res_estimation(model): if backend_value == "fpgadataflow": op_type = node.op_type inst = registry.custom_op[op_type](node) - res_dict[op_type] = inst.node_res_estimation() + res_dict[node.name] = inst.node_res_estimation() return res_dict -- GitLab