Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initiation interval of pooling and zeropadding layers on Vitis backend #1141

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hls4ml/templates/vitis/nnet_utils/nnet_pooling_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void pooling2d_cl(hls::stream<data_T> &data, hls::stream<res_T> &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_T, res_T, CONFIG_T>(data.read(), line_buffer, res);
}
Expand Down
1 change: 1 addition & 0 deletions hls4ml/templates/vivado/nnet_utils/nnet_padding_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void zeropad2d_cl(hls::stream<data_T> &data, hls::stream<res_T> &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_T, CONFIG_T>(res);
Expand Down