diff --git a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py index 6fe6e97dfc2f46a150de60011ee715dcb895a9c7..4cdf138130f37809357b281155d260fdbd789e12 100644 --- a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py +++ b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py @@ -108,6 +108,7 @@ class InferConvInpGen(Transformation): Padding=2 * pad, NumChannels=ifm_ch, inputDataType=dt.name, + SIMD=ifm_ch, ) graph.node.insert(node_ind, padding_node) diff --git a/tests/fpgadataflow/test_convert_to_hls_conv_layer.py b/tests/fpgadataflow/test_convert_to_hls_conv_layer.py index 22c356a5869b25fcc7ae3ef0164ed61b53ef232c..188f20e22fc52e435f8ba0e7d76dff223e084d69 100644 --- a/tests/fpgadataflow/test_convert_to_hls_conv_layer.py +++ b/tests/fpgadataflow/test_convert_to_hls_conv_layer.py @@ -23,6 +23,7 @@ from finn.transformation.fpgadataflow.prepare_cppsim import PrepareCppSim from finn.transformation.fpgadataflow.compile_cppsim import CompileCppSim from finn.transformation.fpgadataflow.set_exec_mode import SetExecMode from finn.custom_op.im2col import compute_conv_output_dim +from finn.custom_op.registry import getCustomOp # conv_config kernel_size,stride, pad @@ -110,3 +111,8 @@ def test_convert_to_hls_conv_layer(conv_config, exec_mode): assert oxe.compare_execution(model, new_model, inp_dict) if kernel_size == 1 and stride > 1 and pad == 0: assert new_model.graph.node[1].op_type == "DownSampler" + + if pad == 1: + padding_node = new_model.get_nodes_by_op_type("FMPadding_Batch")[0] + padding_inst = getCustomOp(padding_node) + assert padding_inst.get_nodeattr("SIMD") == in_chn