XNNPACK icon indicating copy to clipboard operation
XNNPACK copied to clipboard

In function ‘xnn_qs8_qc8w_gemm_minmax_fp32_ukernel_1x2c4__armsimd32’: error: unknown type name ‘int8x4_t’

Open jameshilliard opened this issue 11 months ago • 2 comments

More errors on arm32:

/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c: In function ‘xnn_qs8_qc8w_gemm_minmax_fp32_ukernel_1x2c4__armsimd32’:
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:49:13: error: unknown type name ‘int8x4_t’
       const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
             ^~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:49:29: error: ‘int8x4_t’ undeclared (first use in this function); did you mean ‘int64_t’?
       const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
                             ^~~~~~~~
                             int64_t
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:49:29: note: each undeclared identifier is reported only once for each function it appears in
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:49:39: error: expected ‘,’ or ‘;’ before ‘unaligned_load_s32’
       const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
                                       ^~~~~~~~~~~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:51:13: error: unknown type name ‘int16x2_t’
       const int16x2_t va0c02 = __sxtb16(va0);
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:51:32: warning: implicit declaration of function ‘__sxtb16’ [-Wimplicit-function-declaration]
       const int16x2_t va0c02 = __sxtb16(va0);
                                ^~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:52:13: error: unknown type name ‘int16x2_t’
       const int16x2_t va0c13 = __sxtb16(__ror(va0, 8));
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:54:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vb0’
       const int8x4_t vb0 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:54:22: error: ‘vb0’ undeclared (first use in this function); did you mean ‘va0’?
       const int8x4_t vb0 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
                      va0
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:54:37: error: expected ‘)’ before ‘int8x4_t’
       const int8x4_t vb0 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                                     ^~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:54:22: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
       const int8x4_t vb0 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:54:28: error: invalid type argument of unary ‘*’ (have ‘int’)
       const int8x4_t vb0 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                            ^~~~~~~~~~~~~~~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:55:13: error: unknown type name ‘int16x2_t’
       const int16x2_t vb0c02 = __sxtb16(vb0);
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:57:17: warning: implicit declaration of function ‘__smlad’ [-Wimplicit-function-declaration]
       vacc0x0 = __smlad(va0c02, vb0c02, vacc0x0);
                 ^~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:59:13: error: unknown type name ‘int16x2_t’
       const int16x2_t vb0c13 = __sxtb16(__ror(vb0, 8));
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:61:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vb1’
       const int8x4_t vb1 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:61:22: error: ‘vb1’ undeclared (first use in this function); did you mean ‘vb0’?
       const int8x4_t vb1 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
                      vb0
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:61:37: error: expected ‘)’ before ‘int8x4_t’
       const int8x4_t vb1 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                                     ^~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:61:22: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
       const int8x4_t vb1 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                      ^~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:61:28: error: invalid type argument of unary ‘*’ (have ‘int’)
       const int8x4_t vb1 = *((const int8x4_t*) w); w = (const int8_t*) w + 4;
                            ^~~~~~~~~~~~~~~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:62:13: error: unknown type name ‘int16x2_t’
       const int16x2_t vb1c02 = __sxtb16(vb1);
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:66:13: error: unknown type name ‘int16x2_t’
       const int16x2_t vb1c13 = __sxtb16(__ror(vb1, 8));
             ^~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:88:15: warning: implicit declaration of function ‘__qsub’; did you mean ‘__wur’? [-Wimplicit-function-declaration]
     vout0x0 = __qsub(vout0x0, vmagic_bias_less_zero_point);
               ^~~~~~
               __wur
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:91:15: warning: implicit declaration of function ‘__ssat’ [-Wimplicit-function-declaration]
     vout0x0 = __ssat(vout0x0, 8);
               ^~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:98:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘voutput_min’
     const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
                    ^~~~~~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:98:20: error: ‘voutput_min’ undeclared (first use in this function)
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:98:45: error: expected ‘;’ before ‘params’
     const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
                                             ^~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:99:5: warning: implicit declaration of function ‘__ssub8’ [-Wimplicit-function-declaration]
     __ssub8((int8x4_t) vout, voutput_min);
     ^~~~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:99:24: error: expected ‘)’ before ‘vout’
     __ssub8((int8x4_t) vout, voutput_min);
                        ^~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:100:23: warning: implicit declaration of function ‘__sel’ [-Wimplicit-function-declaration]
     vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
                       ^~~~~
/home/buildroot/buildroot/output/build/xnnpack-f8e3c974b6781845fe294f3a24cd98a5b0d87dad/src/qs8-qc8w-gemm/gen/qs8-qc8w-gemm-1x2c4-minmax-fp32-armsimd32.c:100:30: error: ‘uint8x4_t’ undeclared (first use in this function); did you mean ‘int8x4_t’?
     vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
                              ^~~~~~~~~
                              int8x4_t

jameshilliard avatar Jan 28 '25 01:01 jameshilliard

a quick test of armv7 builds okay locally for me. I did a clang build with bazel. Are you using cmake or a different compiler?

int8x4 and armsimd is a variation for SIMD that uses GPR registers on mobile ARM that do not have NEON.

fbarchard avatar Jan 28 '25 02:01 fbarchard

Are you using cmake or a different compiler?

Yes, I'm using cmake with a gcc based toolchain.

jameshilliard avatar Jan 28 '25 03:01 jameshilliard