Skip to content

Commit 8c71800

Browse files
committed
Fix incorrect pragma in stable softmax
1 parent 50c5a3b commit 8c71800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hls4ml/templates/quartus/firmware/nnet_utils/nnet_activation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ void softmax_stable(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in]){
162162

163163
// For the diffs, use the same type as the input but force rounding and saturation
164164
hls_register ac_fixed<data_T::width, data_T::i_width, true, AC_RND, AC_SAT> d_xi_xmax[CONFIG_T::n_in];
165+
#pragma unroll
165166
for(unsigned i = 0; i < CONFIG_T::n_in; i++){
166-
#pragma HLS unroll
167167
d_xi_xmax[i] = data[i] - x_max;
168168
}
169169

0 commit comments

Comments
 (0)