From 2d5d5fd2da84cd12f9e123025b8e3f5549f23bc6 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Thu, 27 Jan 2022 15:51:04 +0100 Subject: [PATCH] [ConvertToHLS] make 1D SWG kernel check more constrained --- .../transformation/fpgadataflow/convert_to_hls_layers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py index 6cd555c52..2f83f23cb 100644 --- a/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py +++ b/src/finn/transformation/fpgadataflow/convert_to_hls_layers.py @@ -213,10 +213,11 @@ class InferConvInpGen(Transformation): 1D depthwise separable convolutions""" % n.name ) - if stride_h > 1 or stride_w > 1: + if (stride_h > 1 or stride_w > 1) and (not depthwise): assert ( stride_h < k_h and stride_w < k_w - ), """%s: Stride value must be smaller than kernel dim""" + ), """%s: Stride value must be smaller than kernel dim + for non-depthwise (dense) convolutions""" ConvInpGen_node = helper.make_node( "ConvolutionInputGenerator1D", [ConvInpGen_input], -- GitLab