From c67ecec4fe3f7ea13d3204ece255d5906440c9d5 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Wed, 27 Oct 2021 23:17:25 +0200 Subject: [PATCH] [Refactor] Concat -> StreamingConcat --- src/finn/custom_op/fpgadataflow/__init__.py | 4 ++-- src/finn/custom_op/fpgadataflow/concat.py | 2 +- src/finn/transformation/fpgadataflow/convert_to_hls_layers.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/__init__.py b/src/finn/custom_op/fpgadataflow/__init__.py index 32d16da6f..a5c88307c 100644 --- a/src/finn/custom_op/fpgadataflow/__init__.py +++ b/src/finn/custom_op/fpgadataflow/__init__.py @@ -28,7 +28,7 @@ from finn.custom_op.fpgadataflow.addstreams_batch import AddStreams_Batch from finn.custom_op.fpgadataflow.channelwise_op_batch import ChannelwiseOp_Batch -from finn.custom_op.fpgadataflow.concat import Concat +from finn.custom_op.fpgadataflow.concat import StreamingConcat from finn.custom_op.fpgadataflow.convolutioninputgenerator import ( ConvolutionInputGenerator, ) @@ -84,4 +84,4 @@ custom_op["IODMA"] = IODMA custom_op["StreamingDataflowPartition"] = StreamingDataflowPartition custom_op["UpsampleNearestNeighbour_Batch"] = UpsampleNearestNeighbour_Batch custom_op["Lookup"] = Lookup -custom_op["Concat"] = Concat +custom_op["StreamingConcat"] = StreamingConcat diff --git a/src/finn/custom_op/fpgadataflow/concat.py b/src/finn/custom_op/fpgadataflow/concat.py index 56763a95e..482ec4eeb 100644 --- a/src/finn/custom_op/fpgadataflow/concat.py +++ b/src/finn/custom_op/fpgadataflow/concat.py @@ -34,7 +34,7 @@ from finn.custom_op.fpgadataflow.hlscustomop import HLSCustomOp from finn.util.data_packing import npy_to_rtlsim_input, rtlsim_output_to_npy -class Concat(HLSCustomOp): +class StreamingConcat(HLSCustomOp): """Streaming concatenation node with dynamically generated HLS. Only supports concatenating along the last axis.""" diff --git a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py index 88754b974..60ae3fc75 100644 --- a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py +++ b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py @@ -1599,7 +1599,7 @@ class InferLookupLayer(Transformation): class InferConcatLayer(Transformation): """Convert suitable Concat nodes (operating on last/-1 axis) - into Concat HLS layers.""" + into StreamingConcat HLS layers.""" def apply(self, model): graph = model.graph @@ -1633,7 +1633,7 @@ class InferConcatLayer(Transformation): elems_per_stream = [model.get_tensor_shape(x)[-1] for x in node.input] inp_vec = list(model.get_tensor_shape(node.input[0])[:-1]) new_node = helper.make_node( - "Concat", + "StreamingConcat", node.input, node.output, domain="finn.custom_op.fpgadataflow", -- GitLab