diff --git a/src/finn/analysis/fpgadataflow/exp_cycles_per_layer.py b/src/finn/analysis/fpgadataflow/exp_cycles_per_layer.py index 61a70ea7fdce9d96efb53aa99bd3767323b0eb9e..201333aebdb3fc1d15464389e37326dcaf6848e0 100644 --- a/src/finn/analysis/fpgadataflow/exp_cycles_per_layer.py +++ b/src/finn/analysis/fpgadataflow/exp_cycles_per_layer.py @@ -32,6 +32,10 @@ from finn.util.fpgadataflow import is_fpgadataflow_node def exp_cycles_per_layer(model): """Estimates the number of cycles per sample for dataflow layers in the given model. + Ensure that all nodes have unique names (by calling the GiveUniqueNodeNames + transformation) prior to calling this analysis pass to ensure all nodes are + visible in the results. + Returns {node name : cycle estimation}.""" cycle_dict = {} @@ -39,6 +43,6 @@ def exp_cycles_per_layer(model): if is_fpgadataflow_node(node) is True: op_type = node.op_type inst = registry.custom_op[op_type](node) - cycle_dict[str(node)] = inst.get_exp_cycles() + cycle_dict[node.name] = inst.get_exp_cycles() return cycle_dict diff --git a/src/finn/analysis/fpgadataflow/hls_synth_res_estimation.py b/src/finn/analysis/fpgadataflow/hls_synth_res_estimation.py index ad30282d93034f8d043a05a2172790349c31ec83..03b31b9c1ec51b45e17152d35d5824b6137ab4a2 100644 --- a/src/finn/analysis/fpgadataflow/hls_synth_res_estimation.py +++ b/src/finn/analysis/fpgadataflow/hls_synth_res_estimation.py @@ -35,6 +35,9 @@ from finn.util.fpgadataflow import is_fpgadataflow_node def hls_synth_res_estimation(model): """Extracts the FPGA resource results from the Vivado HLS synthesis estimates. + Ensure that all nodes have unique names (by calling the GiveUniqueNodeNames + transformation) prior to calling this analysis pass to ensure all nodes are + visible in the results. Returns {node name : resources_dict}.""" diff --git a/src/finn/analysis/fpgadataflow/post_synth_res.py b/src/finn/analysis/fpgadataflow/post_synth_res.py index 81accba23220d3f25e8560443ff22cf59d3733e9..9206f3f6fcd81de175babef54de990fe01c861e1 100644 --- a/src/finn/analysis/fpgadataflow/post_synth_res.py +++ b/src/finn/analysis/fpgadataflow/post_synth_res.py @@ -36,6 +36,9 @@ from finn.custom_op.registry import getCustomOp def post_synth_res(model, override_synth_report_filename=None): """Extracts the FPGA resource results from the Vivado synthesis. + Ensure that all nodes have unique names (by calling the GiveUniqueNodeNames + transformation) prior to calling this analysis pass to ensure all nodes are + visible in the results. Returns {node name : resources_dict}.""" diff --git a/src/finn/analysis/fpgadataflow/res_estimation.py b/src/finn/analysis/fpgadataflow/res_estimation.py index c190059eceb0cc111477c84f843f4a9f9bf2f393..e52557573dab072709da4452f4e2d477e99b98c9 100644 --- a/src/finn/analysis/fpgadataflow/res_estimation.py +++ b/src/finn/analysis/fpgadataflow/res_estimation.py @@ -32,6 +32,9 @@ from finn.util.fpgadataflow import is_fpgadataflow_node def res_estimation(model): """Estimates the resources needed for the given model. + Ensure that all nodes have unique names (by calling the GiveUniqueNodeNames + transformation) prior to calling this analysis pass to ensure all nodes are + visible in the results. Returns {node name : resource estimation}."""