Skip to content

Commit 6259e66

Browse files
committed
[prelu_opt]: Optimizing prelu SA8
1 parent 899bcbf commit 6259e66

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/src/kernels/transform/impl/mli_krn_prelu_vdsp.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ static MLI_FORCE_INLINE vNx4char_t calc_prelu(
143143
/* Load Input */
144144
vNx4char_t input = mli_prv_load_1vec(vec_in);
145145
vNx4short_t input_cast = mli_math_cast_fx<vNx4char_t, vNx4short_t>(input);
146-
grp_pvNx2_t select = init_predicate_grp(input_cast >= in_zp);
146+
vNx4short_t cond;
147+
cond.lo = input_cast.lo >= in_zp;
148+
cond.hi = input_cast.hi >= in_zp;
149+
grp_pvNx2_t select = init_predicate_grp(cond);
147150

148151
int scale_shift = identity_params->shift;
149152
int scale_shift_left = mli_math_max_fx(-scale_shift, 0);
@@ -196,4 +199,4 @@ static MLI_FORCE_INLINE void compute_prelu(
196199
} // namespace krn
197200
} // namespace mli
198201

199-
#endif // _MLI_KRN_PRELU_VDSP_H_
202+
#endif // _MLI_KRN_PRELU_VDSP_H_

0 commit comments

Comments
 (0)