Build fail on native aarch64.
cbalint13 opened this issue · comments
Balint Cristian commented
Latest master fail to link references on native aarch64 targets.
xnnpack/src/init.c:2432: undefined reference to `xnn_x8_transposec_ukernel__16x16_reuse_dec_zip_neon'
xnnpack/src/init.c:2432: undefined reference to `xnn_x8_transposec_ukernel__16x16_reuse_dec_zip_neon'
xnnpack/src/init.c:2442: undefined reference to `xnn_x16_transposec_ukernel__8x8_reuse_dec_zip_neon'
xnnpack/src/init.c:2442: undefined reference to `xnn_x16_transposec_ukernel__8x8_reuse_dec_zip_neon'
ld: libXNNPACK.so.1.0: internal symbol `xnn_x16_transposec_ukernel__8x8_reuse_dec_zip_neon' isn't defined
ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/XNNPACK.dir/build.make:9103: libXNNPACK.so.1.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:195: CMakeFiles/XNNPACK.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
- See builder-live.log.gz for full environment logs and compile errors.
- The linkage error occurs across various builds , all aarch64 natives.
- Prior to some 20220309 git
master
dates all builds are fine.
Thank you !
~cristian.
Balint Cristian commented
A simple fix would be to include ALL_MICROKERNELS_SRC
into the library:
IF(XNNPACK_LIBRARY_TYPE STREQUAL "default")
- ADD_LIBRARY(XNNPACK ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${PROD_MICROKERNEL_SRCS})
+ ADD_LIBRARY(XNNPACK ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${ALL_MICROKERNEL_SRCS})
ELSEIF(XNNPACK_LIBRARY_TYPE STREQUAL "shared")
- ADD_LIBRARY(XNNPACK SHARED ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${PROD_MICROKERNEL_SRCS})
+ ADD_LIBRARY(XNNPACK SHARED ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${ALL_MICROKERNEL_SRCS})
ELSEIF(XNNPACK_LIBRARY_TYPE STREQUAL "static")
- ADD_LIBRARY(XNNPACK STATIC ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${PROD_MICROKERNEL_SRCS})
+ ADD_LIBRARY(XNNPACK STATIC ${COLD_SRCS} ${HOT_SRCS} ${TABLE_SRCS} ${JIT_SRCS} ${ALL_MICROKERNEL_SRCS})
Such builds now PASS
- Not sure if this is desirable, however it is clear that some functions are missed for
aarch64
. - This also rise questions on how various group of kernels are used within the cmake build flow.
alankelly commented
While including ALL_MICROKERNELS_SRC would fix the problem it would also massively inflate the binary size. The fix is to add the missing files to PROD_NEON_MICROKERNEL_SRCS. Fix incoming. Thanks for reporting.