diff --git a/src/finn/custom_op/fpgadataflow/streamingmaxpool_batch.py b/src/finn/custom_op/fpgadataflow/streamingmaxpool_batch.py index 263707e4d1628237350f5703567c601e7c87ab50..d2e1406d2c4f77e28ee11573cd67831a62b97564 100755 --- a/src/finn/custom_op/fpgadataflow/streamingmaxpool_batch.py +++ b/src/finn/custom_op/fpgadataflow/streamingmaxpool_batch.py @@ -202,21 +202,17 @@ class StreamingMaxPool_Batch(HLSCustomOp): ifm_dim, k, ifm_ch = self.get_1d_attrs_normalized() ceil_mode = self.get_nodeattr("CeilMode") output_size = compute_pool_output_dim(ifm_dim[1], k[1], k[1], 0, ceil_mode) - remainder_size = ifm_dim[1] - k[1] * output_size - if remainder_size < 0: - remainder_size = 0 if self.is_1d(): self.code_gen_dict["$DEFINES$"] = [ """#define ImgDim {}\n #define PoolDim {}\n #define NumChannels {}\n #define PE {}\n #define OutputSize {} - \n #define RemainderSize {}\n #define numReps {}""".format( + \n #define numReps {}""".format( ifm_dim[1], k[1], self.get_nodeattr("NumChannels"), self.get_nodeattr("PE"), output_size, - remainder_size, numReps, ) ] @@ -276,7 +272,7 @@ class StreamingMaxPool_Batch(HLSCustomOp): op = "StreamingMaxPool_Precision_1d" self.code_gen_dict["$DOCOMPUTE$"] = [ """%s<ImgDim, PoolDim, NumChannels, PE, - OutputSize, RemainderSize, %s, %s>(in0, out);""" + OutputSize, %s, %s>(in0, out);""" % (op, dtype_hls, minval_str) ] else: