Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Build error of ncnn for Android 'x86_64' ABI with NDK r27 #2054

Closed
Galasnow opened this issue Aug 7, 2024 · 4 comments
Closed

[BUG] Build error of ncnn for Android 'x86_64' ABI with NDK r27 #2054

Galasnow opened this issue Aug 7, 2024 · 4 comments
Assignees
Labels

Comments

@Galasnow
Copy link

Galasnow commented Aug 7, 2024

Description

I tried to fix a build error of ncnn for Android 'arm64-v8a' ABI with NDK r27 by enabling cmake policy CMP0057 for cmake version >=3.3 in PR Tencent/ncnn#5615,
but build failed on 'X86' ABI:

PS D:\ncnn\build_android_x86_64> cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=D:\Android\SDK\ndk\27.0.12077973/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM="D:\Android\SDK\ndk\27.0.12077973/prebuilt/windows-x86_64/bin/make.exe" -DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-29 -DNCNN_VULKAN=ON -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False ..
-- CMAKE_TOOLCHAIN_FILE = D:/Android/SDK/ndk/27.0.12077973/build/cmake/android.toolchain.cmake
-- CMAKE_INSTALL_PREFIX = D:/ncnn/build_android_x86_64/install
-- NCNN_VERSION_STRING = 1.0.20240806
CMake Deprecation Warning at CMakeLists.txt:24 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Android: Targeting API '29' with architecture 'x86_64', ABI 'x86_64', and processor 'x86_64'
-- Android: Selected unified Clang toolchain
-- The C compiler identification is Clang 18.0.1
-- The CXX compiler identification is Clang 18.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Android/SDK/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Android/SDK/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test NCNN_COMPILER_SUPPORT_GNU_INLINE_ASM
-- Performing Test NCNN_COMPILER_SUPPORT_GNU_INLINE_ASM - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA
-- Performing Test NCNN_COMPILER_SUPPORT_X86_FMA - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP
-- Performing Test NCNN_COMPILER_SUPPORT_X86_XOP - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C
-- Performing Test NCNN_COMPILER_SUPPORT_X86_F16C - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX2 - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512 - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX_VNNI - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_VNNI - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_BF16
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_BF16 - Success
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_FP16
-- Performing Test NCNN_COMPILER_SUPPORT_X86_AVX512_FP16 - Success
-- Target arch: x86 64bit
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found OpenMP_C: -fopenmp=libomp (found version "5.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- Configuring done (12.7s)
-- Generating done (0.5s)
-- Build files have been written to: D:/ncnn/build_android_x86_64
PS D:\ncnn\build_android_x86_64> cmake --build . -j1
……(too long)
[ 65%] Building CXX object src/CMakeFiles/ncnn.dir/allocator.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/benchmark.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/blob.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/c_api.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/command.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/cpu.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/datareader.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/gpu.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/layer.cpp.o
In file included from D:/ncnn/src/layer.cpp:21:
In file included from D:/ncnn/build_android_x86_64/src/layer_declaration.h:547:
D:/ncnn/src/layer/vulkan/noop_vulkan.h:28:17: warning: 'ncnn::Noop_vulkan::forward_inplace' hides overloaded virtual
      function [-Woverloaded-virtual]
   28 |     virtual int forward_inplace(std::vector<VkMat>& bottom_top_blobs, VkCompute& cmd, const Option& opt) const;
      |                 ^
D:/ncnn/src/layer/noop.h:27:17: note: hidden overloaded virtual function 'ncnn::Noop::forward_inplace' declared here:
      different number of parameters (2 vs 3)
   27 |     virtual int forward_inplace(std::vector<Mat>& bottom_top_blobs, const Option& opt) const;
      |                 ^
In file included from D:/ncnn/src/layer.cpp:21:
In file included from D:/ncnn/build_android_x86_64/src/layer_declaration.h:547:
D:/ncnn/src/layer/vulkan/noop_vulkan.h:29:17: warning: 'ncnn::Noop_vulkan::forward_inplace' hides overloaded virtual
      function [-Woverloaded-virtual]
   29 |     virtual int forward_inplace(std::vector<VkImageMat>& bottom_top_blobs, VkCompute& cmd, const Option& opt) const;
      |                 ^
D:/ncnn/src/layer/noop.h:27:17: note: hidden overloaded virtual function 'ncnn::Noop::forward_inplace' declared here:
      different number of parameters (2 vs 3)
   27 |     virtual int forward_inplace(std::vector<Mat>& bottom_top_blobs, const Option& opt) const;
      |                 ^
2 warnings generated.
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/mat.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_affine.cpp.o
[ 66%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_drawing.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_resize.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_rotate.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/modelbin.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/net.cpp.o
D:/ncnn/src/net.cpp:2518:37: warning: unused parameter 'num_threads' [-Wunused-parameter]
 2518 | void Extractor::set_num_threads(int num_threads)
      |                                     ^
D:/ncnn/src/net.cpp:2535:41: warning: unused parameter 'enable' [-Wunused-parameter]
 2535 | void Extractor::set_vulkan_compute(bool enable)
      |                                         ^
2 warnings generated.
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/option.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/paramdict.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/pipeline.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/pipelinecache.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/simpleocv.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/simpleomp.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/simplestl.cpp.o
[ 67%] Building CXX object src/CMakeFiles/ncnn.dir/simplemath.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/simplevk.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/mat_pixel_android.cpp.o
D:/ncnn/src/mat_pixel_android.cpp:36:9: warning: variable 'elempack' set but not used [-Wunused-but-set-variable]
   36 |     int elempack;
      |         ^
D:/ncnn/src/mat_pixel_android.cpp:75:9: warning: variable 'elempack' set but not used [-Wunused-but-set-variable]
   75 |     int elempack;
      |         ^
D:/ncnn/src/mat_pixel_android.cpp:114:9: warning: variable 'elempack' set but not used [-Wunused-but-set-variable]
  114 |     int elempack;
      |         ^
D:/ncnn/src/mat_pixel_android.cpp:153:9: warning: variable 'elempack' set but not used [-Wunused-but-set-variable]
  153 |     int elempack;
      |         ^
4 warnings generated.
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/absval.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/absval_vulkan.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/batchnorm.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/batchnorm_x86.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/batchnorm_vulkan.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/batchnorm_x86_avx512.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/batchnorm_x86_fma.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/batchnorm_x86_avx.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/bias.cpp.o
[ 68%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bias_x86.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bias_x86_avx512.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bias_x86_fma.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bias_x86_avx.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/bnll.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bnll_x86.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bnll_x86_avx512.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bnll_x86_fma.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/bnll_x86_avx.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/concat.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/concat_x86.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/concat_vulkan.cpp.o
[ 69%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/concat_x86_avx512.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/concat_x86_fma.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/concat_x86_avx.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/convolution.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/convolution_vulkan.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_avx512.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_fma.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_avx.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_avx512vnni.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_avxvnni.cpp.o
[ 70%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_avx2.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolution_x86_xop.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/crop.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/crop_x86.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/crop_vulkan.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/crop_x86_avx512.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/crop_x86_fma.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/crop_x86_avx.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/deconvolution.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolution_x86.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/deconvolution_vulkan.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolution_x86_avx512.cpp.o
[ 71%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolution_x86_fma.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolution_x86_avx.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/dropout.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dropout_x86.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/dropout_vulkan.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dropout_x86_avx512.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dropout_x86_fma.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dropout_x86_avx.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/eltwise.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/eltwise_x86.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/eltwise_vulkan.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/eltwise_x86_avx512.cpp.o
[ 72%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/eltwise_x86_fma.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/eltwise_x86_avx.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/elu.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/elu_x86.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/elu_vulkan.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/elu_x86_avx512.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/elu_x86_fma.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/elu_x86_avx.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/embed.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/exp.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/flatten.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/flatten_x86.cpp.o
[ 73%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/flatten_vulkan.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/flatten_x86_avx512.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/flatten_x86_fma.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/flatten_x86_avx.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/innerproduct.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/innerproduct_x86.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/innerproduct_vulkan.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/innerproduct_x86_avx512.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/innerproduct_x86_fma.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/innerproduct_x86_avx.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/innerproduct_x86_f16c.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/input.cpp.o
[ 74%] Building CXX object src/CMakeFiles/ncnn.dir/layer/log.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/lrn.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lrn_x86.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/lrn_vulkan.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lrn_x86_avx512.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lrn_x86_fma.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lrn_x86_avx.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/memorydata.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/memorydata_vulkan.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/mvn.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/pooling.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/pooling_x86.cpp.o
[ 75%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/pooling_vulkan.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/pooling_x86_avx512.cpp.o
In file included from D:/ncnn/build_android_x86_64/src/layer/x86/pooling_x86_avx512.cpp:32:
D:/ncnn/src/layer/x86/pooling_2x2.h:33:13: warning: variable 'outcount' set but not used [-Wunused-but-set-variable]
   33 |         int outcount = 0;
      |             ^
1 warning generated.
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/pooling_x86_fma.cpp.o
In file included from D:/ncnn/build_android_x86_64/src/layer/x86/pooling_x86_fma.cpp:32:
D:/ncnn/src/layer/x86/pooling_2x2.h:33:13: warning: variable 'outcount' set but not used [-Wunused-but-set-variable]
   33 |         int outcount = 0;
      |             ^
1 warning generated.
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/pooling_x86_avx.cpp.o
In file included from D:/ncnn/build_android_x86_64/src/layer/x86/pooling_x86_avx.cpp:32:
D:/ncnn/src/layer/x86/pooling_2x2.h:33:13: warning: variable 'outcount' set but not used [-Wunused-but-set-variable]
   33 |         int outcount = 0;
      |             ^
1 warning generated.
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/power.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/prelu.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/prelu_x86.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/prelu_vulkan.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/prelu_x86_avx512.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/prelu_x86_fma.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/prelu_x86_avx.cpp.o
[ 76%] Building CXX object src/CMakeFiles/ncnn.dir/layer/proposal.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/reduction.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/relu.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/relu_x86.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/relu_vulkan.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/relu_x86_avx512.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/relu_x86_fma.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/relu_x86_avx.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/reshape.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/reshape_x86.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/reshape_vulkan.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/reshape_x86_avx512.cpp.o
[ 77%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/reshape_x86_fma.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/reshape_x86_avx.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/roipooling.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/scale.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/scale_x86.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/scale_vulkan.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/scale_x86_avx512.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/scale_x86_fma.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/scale_x86_avx.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/sigmoid.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/sigmoid_x86.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/sigmoid_vulkan.cpp.o
[ 78%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/sigmoid_x86_avx512.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/sigmoid_x86_fma.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/sigmoid_x86_avx.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/slice.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/slice_x86.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/slice_vulkan.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/slice_x86_avx512.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/slice_x86_fma.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/slice_x86_avx.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/softmax.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/softmax_x86.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/softmax_vulkan.cpp.o
[ 79%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/softmax_x86_avx512.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/softmax_x86_fma.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/softmax_x86_avx.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/split.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/split_vulkan.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/tanh.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/tanh_x86.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/tanh_vulkan.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/tanh_x86_avx512.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/tanh_x86_fma.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/tanh_x86_avx.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/threshold.cpp.o
[ 80%] Building CXX object src/CMakeFiles/ncnn.dir/layer/tile.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/rnn.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/lstm.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_avx512.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_fma.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_avx.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_avx512vnni.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_avxvnni.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_avx2.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/lstm_x86_xop.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/binaryop.cpp.o
[ 81%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/binaryop_x86.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/binaryop_vulkan.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/binaryop_x86_avx512.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/binaryop_x86_fma.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/binaryop_x86_avx.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/unaryop.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/unaryop_x86.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/unaryop_vulkan.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/unaryop_x86_avx512.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/unaryop_x86_fma.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/unaryop_x86_avx.cpp.o
[ 82%] Building CXX object src/CMakeFiles/ncnn.dir/layer/convolutiondepthwise.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolutiondepthwise_x86.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/convolutiondepthwise_vulkan.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolutiondepthwise_x86_avx512.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolutiondepthwise_x86_fma.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/convolutiondepthwise_x86_avx.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/padding.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/padding_x86.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/padding_vulkan.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/padding_x86_avx512.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/padding_x86_fma.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/padding_x86_avx.cpp.o
[ 83%] Building CXX object src/CMakeFiles/ncnn.dir/layer/squeeze.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/expanddims.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/normalize.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/normalize_vulkan.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/permute.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/permute_vulkan.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/priorbox.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/priorbox_vulkan.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/detectionoutput.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/interp.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/interp_x86.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/interp_vulkan.cpp.o
[ 84%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/interp_x86_avx512.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/interp_x86_fma.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/interp_x86_avx.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/deconvolutiondepthwise.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolutiondepthwise_x86.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/deconvolutiondepthwise_vulkan.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolutiondepthwise_x86_avx512.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolutiondepthwise_x86_fma.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/deconvolutiondepthwise_x86_avx.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/shufflechannel.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/shufflechannel_x86.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/shufflechannel_vulkan.cpp.o
[ 85%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/shufflechannel_x86_avx512.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/shufflechannel_x86_fma.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/shufflechannel_x86_avx.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/instancenorm.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/instancenorm_vulkan.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/clip.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/clip_x86.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/clip_vulkan.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/clip_x86_avx512.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/clip_x86_fma.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/clip_x86_avx.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/reorg.cpp.o
[ 86%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/reorg_vulkan.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/yolodetectionoutput.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/quantize.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/quantize_x86.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/quantize_x86_avx512.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/quantize_x86_fma.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/quantize_x86_avx.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/dequantize.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dequantize_x86.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dequantize_x86_avx512.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dequantize_x86_fma.cpp.o
[ 87%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/dequantize_x86_avx.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/yolov3detectionoutput.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/yolov3detectionoutput_x86.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/yolov3detectionoutput_x86_avx512.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/yolov3detectionoutput_x86_fma.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/yolov3detectionoutput_x86_avx.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/psroipooling.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/roialign.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/roialign_x86.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/roialign_x86_avx512.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/roialign_x86_fma.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/roialign_x86_avx.cpp.o
[ 88%] Building CXX object src/CMakeFiles/ncnn.dir/layer/packing.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/packing_x86.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/packing_vulkan.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/packing_x86_avx512.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/packing_x86_fma.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/packing_x86_avx.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/requantize.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/requantize_x86.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/requantize_x86_avx512.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/requantize_x86_fma.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/requantize_x86_avx.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/cast.cpp.o
[ 89%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/cast_x86.cpp.o
[ 90%] Building CXX object src/CMakeFiles/ncnn.dir/layer/vulkan/cast_vulkan.cpp.o
[ 90%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512.cpp.o
[ 90%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_fma.cpp.o
[ 90%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx.cpp.o
[ 90%] Building CXX object src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512bf16.cpp.o
fatal error: error in backend: Cannot select: 0x267c6266850: v32bf16 = insert_subvector 0x267c626ccf0, 0x267c6266fc0,
      Constant:i64<16>
  0x267c626ccf0: v32bf16 = insert_subvector undef:v32bf16, 0x267c62670a0, Constant:i64<0>
    0x267c62667e0: v32bf16 = undef
    0x267c62670a0: v16bf16 = X86ISD::CVTNEPS2BF16 nnan ninf nsz arcp contract afn reassoc 0x267c626d2a0
      0x267c626d2a0: v16f32,ch = load<(load (s512) from %ir.59, align 1, !tbaa !30)> 0x267c897ad40, 0x267c626d540, undef:i64
        0x267c626d540: i64,ch = CopyFromReg 0x267c897ad40, Register:i64 %17
          0x267c62661c0: i64 = Register %17
        0x267c62684c0: i64 = undef
    0x267c6268760: i64 = Constant<0>
  0x267c6266fc0: v16bf16 = X86ISD::CVTNEPS2BF16 nnan ninf nsz arcp contract afn reassoc 0x267c62662a0
    0x267c62662a0: v16f32,ch = load<(load (s512) from %ir.61, align 1, !tbaa !30)> 0x267c897ad40, 0x267c6266e00, undef:i64
      0x267c6266e00: i64 = add 0x267c626d540, Constant:i64<64>
        0x267c626d540: i64,ch = CopyFromReg 0x267c897ad40, Register:i64 %17
          0x267c62661c0: i64 = Register %17
        0x267c62685a0: i64 = Constant<64>
      0x267c62684c0: i64 = undef
  0x267c6266310: i64 = Constant<16>
In function: _ZN4ncnnL21cast_fp32_to_bf16_sseERKNS_3MatERS0_RKNS_6OptionE.omp_outlined
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: D:\\Android\\SDK\\ndk\\27.0.12077973\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=x86_64-none-linux-android29 --sysroot=D:/Android/SDK/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/sysroot -ID:/ncnn/src/layer/x86 -ID:/ncnn/src -ID:/ncnn/build_android_x86_64/src -ID:/ncnn/src/layer -ID:/ncnn/src/.. -ID:/ncnn/glslang/glslang/.. -ID:/ncnn/build_android_x86_64/include -ID:/ncnn/glslang/SPIRV/.. -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -O3 -DNDEBUG -std=gnu++11 -fPIC -DNCNN_STATIC_DEFINE -fopenmp -Wall -Wextra -Wno-unused-function -Ofast -ffast-math -fvisibility=hidden -fvisibility-inlines-hidden -fno-rtti -fno-exceptions -msse2 -msse -pthread -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl -mfma -mf16c -mavx512bf16 -MD -MT src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512bf16.cpp.o -MF CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512bf16.cpp.o.d -o CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512bf16.cpp.o -c D:/ncnn/src/layer/x86/cast_x86_avx512bf16.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'D:/ncnn/src/layer/x86/cast_x86_avx512bf16.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN4ncnnL21cast_fp32_to_bf16_sseERKNS_3MatERS0_RKNS_6OptionE.omp_outlined'
Exception Code: 0xE0000046
 #0 0x00007ffba5f3fabc (C:\Windows\System32\KERNELBASE.dll+0x5fabc)
 #1 0x00007ff6f032b12a (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x5fb12a)
 #2 0x00007ff6f03635ed (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6335ed)
 #3 0x00007ff6efe6f277 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13f277)
 #4 0x00007ff6f032c93a (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x5fc93a)
 #5 0x00007ff6f1b69759 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1e39759)
 #6 0x00007ff6f1b68855 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1e38855)
 #7 0x00007ff6f0ce004f (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xfb004f)
 #8 0x00007ff6f1b60d1c (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1e30d1c)
 #9 0x00007ff6f1b5cef0 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1e2cef0)
#10 0x00007ff6f1b59369 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1e29369)
#11 0x00007ff6f0cd1d35 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xfa1d35)
#12 0x00007ff6f0508c38 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7d8c38)
#13 0x00007ff6f0151228 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x421228)
#14 0x00007ff6f015af33 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x42af33)
#15 0x00007ff6f015208a (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x42208a)
#16 0x00007ff6f13f05b2 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x16c05b2)
#17 0x00007ff6f174d4f7 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1a1d4f7)
#18 0x00007ff6f3523a54 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x37f3a54)
#19 0x00007ff6f1688dae (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1958dae)
#20 0x00007ff6f044d110 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x71d110)
#21 0x00007ff6f04e3d15 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7b3d15)
#22 0x00007ff6efe6e0f0 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13e0f0)
#23 0x00007ff6efe6b200 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13b200)
#24 0x00007ff6f1409e5d (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x16d9e5d)
#25 0x00007ff6f032b0fd (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x5fb0fd)
#26 0x00007ff6f1409885 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x16d9885)
#27 0x00007ff6f03fc573 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6cc573)
#28 0x00007ff6f041fa7d (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6efa7d)
#29 0x00007ff6efe6a362 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13a362)
#30 0x00007ff6efe7b0a7 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x14b0a7)
#31 0x00007ff6efd31395 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1395)
#32 0x00007ff6efd314c8 (D:\Android\SDK\ndk\27.0.12077973\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x14c8)
#33 0x00007ffba890257d (C:\Windows\System32\KERNEL32.DLL+0x1257d)
#34 0x00007ffba8beaf28 (C:\Windows\SYSTEM32\ntdll.dll+0x5af28)
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Android (12027248, based on r522817) clang version 18.0.1 (https://android.googlesource.com/toolchain/llvm-project d8003a456d14a3deb8054cdaa529ffbf02d9b262)
Target: x86_64-none-linux-android29
Thread model: posix
InstalledDir: D:/Android/SDK/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/bin
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: C:/Users/hp/AppData/Local/Temp/cast_x86_avx512bf16-b8d4a1.cpp
clang++: note: diagnostic msg: C:/Users/hp/AppData/Local/Temp/cast_x86_avx512bf16-b8d4a1.sh
clang++: note: diagnostic msg:

********************
make[2]: *** [src/CMakeFiles/ncnn.dir/build.make:5370: src/CMakeFiles/ncnn.dir/layer/x86/cast_x86_avx512bf16.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:431: src/CMakeFiles/ncnn.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

The Github Action check of that PR shows a similar problem of 'X86' ABI on Linux. Manually turning off avx512bf16 by adding -DNCNN_AVX512BF16=OFF can pass the compilation. And there is no problem with NDK r26.
Attached files: cast_x86_avx512bf16-b8d4a1.zip
full_log: x86_build_error.txt

Affected versions

r27

Canary version

No response

Host OS

Linux, Windows

Host OS version

Windows 11 Pro (22631.3958), Linux unknown (GitHub Action)

Affected ABIs

x86, x86_64

Build system

CMake

Other build system

No response

minSdkVersion

29

Device API level

No response

@Galasnow Galasnow added the bug label Aug 7, 2024
@dg0yt
Copy link

dg0yt commented Aug 8, 2024

Also observed in vcpkg.

@pirama-arumuga-nainar
Copy link
Collaborator

pirama-arumuga-nainar commented Aug 11, 2024

This is the fix. It is included in r28.

It doesn't cherry-pick cleanly to r27 - will try to resolve conflicts next week.

commit 55c466da2f2f0baa509eb709b8de8926bd498b9b
Author: Benjamin Kramer <[email protected]>
Date:   Wed Mar 6 00:48:01 2024 +0100

    [X86][AVX512BF16] Add a few missing insert/extract patterns
    
    These are really the same as the f16 (and i16) instructions, but we need
    them for any type that can occur.

@Galasnow
Copy link
Author

This is the fix. It is included in r28.

It doesn't cherry-pick cleanly to r27 - will try to resolve conflicts next week.

Thanks! I'm looking forward to it.

@pirama-arumuga-nainar
Copy link
Collaborator

The patch applies cleanly using patch command and only failed to apply with git am - which is not required for the CI build. r.android.com/3217552 has the cherry-pick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Prebuilts submitted
Status: Merged
Development

No branches or pull requests

5 participants