Skip to content

Commit cc3b428

Browse files
dsharletgxnnpack-bot
authored andcommitted
Fix compiler error when trying to use f16-neonfp16arith
PiperOrigin-RevId: 731160509
1 parent 764c795 commit cc3b428

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xnnpack/simd/f16-generic-functions.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ static XNN_INLINE xnn_simd_f16_t xnn_srl_f16(xnn_simd_f16_t a, uint8_t b);
3232
static XNN_INLINE xnn_simd_f16_t xnn_generic_getexp_f16(xnn_simd_f16_t a) {
3333
// Some useful constants.
3434
XNN_SIMD_CONST_F16_FROM_INT16(exp_mask, 0x7c00);
35-
XNN_SIMD_CONST_F16_FROM_FLOAT(bias_32, 32.0f);
36-
XNN_SIMD_CONST_F16_FROM_FLOAT(bias_47, 47.0f);
35+
XNN_SIMD_CONST_F16_FROM_INT16(bias_32, 0x5000); // 32
36+
XNN_SIMD_CONST_F16_FROM_INT16(bias_47, 0x51E0); // 47
3737

3838
// The bits of IEE754 half-precision floating-point format are:
3939
//

0 commit comments

Comments
 (0)