From cc648647e98871a4602d917017ed76f15c66f17e Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Sat, 13 Nov 2021 14:02:53 +0100 Subject: [PATCH] [SetFolding] handle ConvolutionInputGenerator1D as well --- src/finn/transformation/fpgadataflow/set_folding.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/finn/transformation/fpgadataflow/set_folding.py b/src/finn/transformation/fpgadataflow/set_folding.py index 758b7efd6..617c9f431 100644 --- a/src/finn/transformation/fpgadataflow/set_folding.py +++ b/src/finn/transformation/fpgadataflow/set_folding.py @@ -104,7 +104,12 @@ class SetFolding(Transformation): ] # these ops use SIMD parallelism, up to a max value of NumChannels # ConvolutionInputGenerator has a special case when depthwise=1 - simd_ops = ["DownSampler", "FMPadding_Batch", "ConvolutionInputGenerator"] + simd_ops = [ + "DownSampler", + "FMPadding_Batch", + "ConvolutionInputGenerator", + "ConvolutionInputGenerator1D", + ] # these ops are preceded by depthwise SWG and have special behavior, # as explained in the SetFolding docstring depthwise_op_exceptions = ["Vector_Vector_Activate_Batch", "Pool_Batch"] @@ -166,7 +171,10 @@ class SetFolding(Transformation): "Expected SWU on DW op input, found " + swu_node.op_type ) elif op_type in simd_ops: - if op_type == "ConvolutionInputGenerator": + if op_type in [ + "ConvolutionInputGenerator", + "ConvolutionInputGenerator1D", + ]: depthwise = node_inst.get_nodeattr("depthwise") if depthwise == 0: max_simd = node_inst.get_nodeattr("IFMChannels") -- GitLab