diff --git a/hls4ml/templates/vitis/nnet_utils/nnet_pooling_stream.h b/hls4ml/templates/vitis/nnet_utils/nnet_pooling_stream.h index 37ff3c68b..d46e7d917 100644 --- a/hls4ml/templates/vitis/nnet_utils/nnet_pooling_stream.h +++ b/hls4ml/templates/vitis/nnet_utils/nnet_pooling_stream.h @@ -110,7 +110,7 @@ void pooling2d_cl(hls::stream &data, hls::stream &res) { ReadInputWidth: for (unsigned i_iw = 0; i_iw < CONFIG_T::in_width; i_iw++) { #pragma HLS LOOP_FLATTEN - #pragma HLS PIPELINE + #pragma HLS PIPELINE II=CONFIG_T::reuse_factor compute_pool_buffer_2d(data.read(), line_buffer, res); } diff --git a/hls4ml/templates/vivado/nnet_utils/nnet_padding_stream.h b/hls4ml/templates/vivado/nnet_utils/nnet_padding_stream.h index 9df5d5403..2de4af2a3 100644 --- a/hls4ml/templates/vivado/nnet_utils/nnet_padding_stream.h +++ b/hls4ml/templates/vivado/nnet_utils/nnet_padding_stream.h @@ -57,6 +57,7 @@ void zeropad2d_cl(hls::stream &data, hls::stream &res) { PadMain: for (int i = 0; i < CONFIG_T::in_height; i++) { + #pragma HLS PIPELINE II=1 PadLeft: for (int j = 0; j < CONFIG_T::pad_left; j++) { fill_zero(res);