In function: xnn_f16_avgpool_minmax_ukernel_9p8x__neonfp16arith_c8, clang: note: diagnostic msg: /var/folders/cj/15jvtbpn3z15rcddhg75_h_r0000gn/T/neonfp16arith-cd34d7.c
@Qinlong275 Could you please try to update your clang compiler to a newer version that supports the neonfp16arith instruction set. You may also need to modify the compiler flags that are being used to compile XNNPACK.
Thank you! > @Qinlong275 Could you please try to update your clang compiler to a newer version that supports the neonfp16arith instruction set. You may also need to modify the compiler flags that are being used to compile XNNPACK. Thank you!

nice bro, I update the android ndk version from 19.2.5345600 to 22.1.7171670, and then build success! thx~ Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62379">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62379">No</a>
 @Qinlong275 Thank you for the confirmation!
Glad it worked for you.
Thank you!
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.12.0

### Custom code

Yes

### OS platform and distribution

mac apple m1; android studio

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

build in androidstudio use ndk r19

### GCC/compiler version

clang version 8.0.2

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

run android gradle task assemble to build release TFLite SO。

### Standalone code to reproduce the issue

```shell
run android gradle task assemble to build release TFLite SO。
```


### Relevant log output

```shell
[715/901] Building ASM object _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/qs8-igemm/gen/qs8-igemm-4x8-minmax-rndnu-asm-aarch32-neon-mlal-lane-prfm-cortex-a7.S.o
  [716/901] Building ASM object _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/qs8-igemm/gen/qs8-igemm-4x8-minmax-rndnu-asm-aarch32-neon-mlal-lane-prfm-cortex-a53.S.o
  [717/901] Building ASM object _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/qs8-igemm/gen/qs8-igemm-4x8-minmax-rndnu-asm-aarch32-neon-mlal-lane-prfm-ld64.S.o
  FAILED: /Users/qinlong/Library/Android/sdk/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi19 --gcc-toolchain=/Users/qinlong/Library/Android/sdk/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/qinlong/Library/Android/sdk/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DEIGEN_MPL2_ONLY -DFXDIV_USE_INLINE_ASSEMBLY=0 -DNOMINMAX=1 -DPTHREADPOOL_NO_DEPRECATED_API=1 -DXNN_ENABLE_ARM_BF16=1 -DXNN_ENABLE_ARM_DOTPROD=1 -DXNN_ENABLE_ARM_FP16_SCALAR=1 -DXNN_ENABLE_ARM_FP16_VECTOR=1 -DXNN_ENABLE_ASSEMBLY=1 -DXNN_ENABLE_DWCONV_MULTIPASS=0 -DXNN_ENABLE_GEMM_M_SPECIALIZATION=1 -DXNN_ENABLE_JIT=0 -DXNN_ENABLE_MEMOPT=1 -DXNN_ENABLE_RISCV_VECTOR=1 -DXNN_ENABLE_SPARSE=1 -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../jni -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../jni/benchmark -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../jni/common -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/Interface -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/base -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/base/misc -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/mnn -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/onnx -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/hdrs -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/hdrs/coreML -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/hdrs/gpu -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/hdrs/liteC -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/hdrs/metal -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/libs -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/libs/android -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/libs/android/arm64-v8a -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/libs/android/armeabi-v7a -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/jni/../../../../../src/tflite/libs/iOS -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/opencl_headers -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/vulkan_headers/include -I/Users/qinlong/aiInterpret/FrontAIFramework/3rdparty/TNetTensorflow/tensorflow/lite/delegates/gpu/common -I/Users/qinlong/aiInterpret/FrontAIFramework/3rdparty/TNetTensorflow/tensorflow/lite/delegates/gpu/common/task -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/xnnpack/src -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/pthreadpool-source/include -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/FXdiv-source/include -I/Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/FP16-source/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -march=armv7-a -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security  -Oz -DNDEBUG  -std=c99 -fPIC -O2 -pthread  -marm  -march=armv8.2-a+fp16 -mfpu=neon-fp-armv8  -mfloat-abi=softfp -MD -MT _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/amalgam/neonfp16arith.c.o -MF _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/amalgam/neonfp16arith.c.o.d -o _deps/xnnpack-build/CMakeFiles/microkernels-prod.dir/src/amalgam/neonfp16arith.c.o -c /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/xnnpack/src/amalgam/neonfp16arith.c
  fatal error: error in backend: Cannot select: 0x7f895987f7a8: v8f16 = bitcast 0x7f895987c468, /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/xnnpack/src/amalgam/neonfp16arith.c:50:28
    0x7f895987c468: v8i16,ch = ARMISD::VLD1DUP<(load 2 from %ir.17)> 0x7f8959712ac8, 0x7f895987f608, Constant:i32<2>, /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/xnnpack/src/amalgam/neonfp16arith.c:50:50
      0x7f895987f608: i32 = add nuw 0x7f895987ccf0, Constant:i32<2>, /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a/xnnpack/src/amalgam/neonfp16arith.c:50:50
        0x7f895987ccf0: i32,ch = load<(load 4 from %fixed-stack.0, align 8)> 0x7f8959712ac8, FrameIndex:i32<-7>, undef:i32
          0x7f895987cc88: i32 = FrameIndex<-7>
          0x7f895987c7a8: i32 = undef
        0x7f895987f5a0: i32 = Constant<2>
      0x7f895987f5a0: i32 = Constant<2>
  In function: xnn_f16_avgpool_minmax_ukernel_9p8x__neonfp16arith_c8
  clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
  Android (5058415 based on r339409) clang version 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec746213857d083c0e8b0abb568790) (https://android.googlesource.com/toolchain/llvm 7a6618d69e7e8111e1d49dc9e7813767c5ca756a) (based on LLVM 8.0.2svn)
  Target: armv7-none-linux-android19
  Thread model: posix
  InstalledDir: /Users/qinlong/Library/Android/sdk/ndk/19.2.5345600/toolchains/llvm/prebuilt/darwin-x86_64/bin
  clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
  clang: note: diagnostic msg: 
  ********************
  
  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
  Preprocessed source(s) and associated run script(s) are located at:
  clang: note: diagnostic msg: /var/folders/cj/15jvtbpn3z15rcddhg75_h_r0000gn/T/neonfp16arith-cd34d7.c
  clang: note: diagnostic msg: /var/folders/cj/15jvtbpn3z15rcddhg75_h_r0000gn/T/neonfp16arith-cd34d7.sh
  clang: note: diagnostic msg: Crash backtrace is located in
  clang: note: diagnostic msg: /Users/qinlong/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
  clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
  clang: note: diagnostic msg: 
  
  ********************
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /Users/qinlong/Library/Android/sdk/cmake/3.6.4111459/bin/ninja \
        -C \
        /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk/.cxx/Release/60191d14/armeabi-v7a \
        benchmark_model \
        flatc \
        flathash \
        tNetInterpret
    from /Users/qinlong/aiInterpret/FrontAIFramework/test/android/lib_tnet_interpret/lib_tnet_interpretsdk
```
