🐛 Describe the bug
When building pytorch on aarch64 the build encounters an error with XNNPACK using incorrect types.
FAILED: [code=1] confu-deps/XNNPACK/CMakeFiles/microkernels-prod.dir/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c.o
/usr/bin/cc -DCAFFE2_PERF_WITH_SVE=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DXNN_ENABLE_ARM_BF16=0 -DXNN_ENABLE_ARM_DOTPROD=0 -DXNN_ENABLE_ARM_FP16_SCALAR=0 -DXNN_ENABLE_ARM_FP16_VECTOR=0 -DXNN_ENABLE_ARM_I8MM=0 -DXNN_ENABLE_ARM_SME2=1 -DXNN_ENABLE
_ARM_SME=1 -DXNN_ENABLE_ASSEMBLY=0 -DXNN_ENABLE_AVX256SKX=1 -DXNN_ENABLE_AVX256VNNI=1 -DXNN_ENABLE_AVX256VNNIGFNI=1 -DXNN_ENABLE_AVX512AMX=1 -DXNN_ENABLE_AVX512F=1 -DXNN_ENABLE_AVX512FP16=1 -DXNN_ENABLE_AVX512SKX=1 -DXNN_ENABLE_AVX512VBMI=1
-DXNN_ENABLE_AVX512VNNI=1 -DXNN_ENABLE_AVX512VNNIGFNI=1 -DXNN_ENABLE_AVXVNNI=0 -DXNN_ENABLE_AVXVNNIINT8=0 -DXNN_ENABLE_CPUINFO=1 -DXNN_ENABLE_DWCONV_MULTIPASS=0 -DXNN_ENABLE_GEMM_M_SPECIALIZATION=1 -DXNN_ENABLE_HVX=1 -DXNN_ENABLE_KLEIDIAI=
0 -DXNN_ENABLE_MEMOPT=1 -DXNN_ENABLE_RISCV_VECTOR=1 -DXNN_ENABLE_SPARSE=1 -DXNN_ENABLE_VSX=1 -I/buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/include -I/buildstream/libreml2/components/python3-pytorch.bst/third_par
ty/XNNPACK/src -I/buildstream/libreml2/components/python3-pytorch.bst/third_party/pthreadpool/include -I/buildstream/libreml2/components/python3-pytorch.bst/third_party/FXdiv/include -isystem /buildstream/libreml2/components/python3-pytorch
.bst/third_party/protobuf/src -O3 -DNDEBUG -std=c99 -fPIC -Wno-psabi -O2 -pthread -fno-math-errno -MD -MT confu-deps/XNNPACK/CMakeFiles/microkernels-prod.dir/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c.o -MF confu-deps/XNNPACK/CMakeFiles/micr
okernels-prod.dir/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c.o.d -o confu-deps/XNNPACK/CMakeFiles/microkernels-prod.dir/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c.o -c /buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/src
/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c
/buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c: In function 'xnn_qs8_vlrelu_ukernel__neon_u32':
/buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c:29:53: error: passing argument 1 of 'vld1q_dup_s16' from incompatible pointer type [-Wincompatible-pointer-types]
29 | const int16x8_t vinput_zero_point = vld1q_dup_s16(¶ms->scalar.input_zero_point);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const int32_t * {aka const int *}
In file included from /buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c:12:
/usr/lib/gcc/aarch64-unknown-linux-gnu/15.2.0/include/arm_neon.h:12967:31: note: expected 'const int16_t *' {aka 'const short int *'} but argument is of type 'const int32_t *' {aka 'const int *'}
12967 | vld1q_dup_s16 (const int16_t* __a)
| ~~~~~~~~~~~~~~~^~~
/buildstream/libreml2/components/python3-pytorch.bst/third_party/XNNPACK/src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c:32:54: error: passing argument 1 of 'vld1q_dup_s16' from incompatible pointer type [-Wincompatible-pointer-types]
32 | const int16x8_t voutput_zero_point = vld1q_dup_s16(¶ms->scalar.output_zero_point);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const int32_t * {aka const int *}
/usr/lib/gcc/aarch64-unknown-linux-gnu/15.2.0/include/arm_neon.h:12967:31: note: expected 'const int16_t *' {aka 'const short int *'} but argument is of type 'const int32_t *' {aka 'const int *'}
12967 | vld1q_dup_s16 (const int16_t* __a)
| ~~~~~~~~~~~~~~~^~~
This bug appears to have been fixed upstream in XNNPACK, covered by google/XNNPACK#7726 (not the whole issue seemingly wasn't fixed until google/XNNPACK@2d54eea) but pytorch is not up to this version of XNNPACK and manually updating the version leads to more errors that indicate pytorch itself needs updating.
Versions
Pytorch: 2.9.0
GCC: 15.2.0
XNNPACK: 51a0103656eff6fc9bfd39a4597923c4b542c883
cc @malfet @seemethere @snadampal @milpuz01 @aditew01 @nikhil-arm @fadara01
🐛 Describe the bug
When building pytorch on aarch64 the build encounters an error with XNNPACK using incorrect types.
This bug appears to have been fixed upstream in XNNPACK, covered by google/XNNPACK#7726 (not the whole issue seemingly wasn't fixed until google/XNNPACK@2d54eea) but pytorch is not up to this version of XNNPACK and manually updating the version leads to more errors that indicate pytorch itself needs updating.
Versions
Pytorch: 2.9.0
GCC: 15.2.0
XNNPACK: 51a0103656eff6fc9bfd39a4597923c4b542c883
cc @malfet @seemethere @snadampal @milpuz01 @aditew01 @nikhil-arm @fadara01