Skip to content

Commit 0599cca

Browse files
authored
Merge pull request #800 from bo3z/broken-conv-inline
Discussion - Inlined Conv slows down latency significantly (up to x15 - x20)
2 parents 0032dae + 782246d commit 0599cca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hls4ml/templates/vivado/nnet_utils/nnet_conv_stream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void compute_output_buffer_2d(
260260
hls::stream<res_T> &res_stream,
261261
typename CONFIG_T::weight_t weights[CONFIG_T::kernel_size * CONFIG_T::n_chan * CONFIG_T::n_filt],
262262
typename CONFIG_T::bias_t biases[CONFIG_T::n_filt]) {
263-
#pragma HLS INLINE
263+
#pragma HLS INLINE OFF
264264

265265
// Thresholds
266266
const static int lShiftX = CONFIG_T::filt_width - 1;
@@ -289,7 +289,7 @@ void compute_output_buffer_2d(
289289
if ((sX - lShiftX) == 0 && (sY - lShiftY) == 0 && pY > lShiftY - 1 && pX > lShiftX - 1) {
290290

291291
// Dense multiply
292-
#pragma HLS INLINE recursive
292+
// #pragma HLS INLINE recursive
293293
if (CONFIG_T::strategy == nnet::latency) {
294294
dense_latency<typename data_T::value_type, typename res_T::value_type, typename CONFIG_T::mult_config>(
295295
kernel_data, res_out, weights, biases);

0 commit comments

Comments
 (0)