Ncnn: prepare for release with experimental gpu inference capability

Created on 17 Feb 2019  ·  26Comments  ·  Source: Tencent/ncnn

shader

  • [x] priorbox (ssd)
  • [x] premute (ssd)
  • [x] deconvolution
  • [x] deconvolutiondepthwise (yolo)
  • [x] interp (upsample)
  • [x] reorg (yolov2)
  • [x] prelu
  • [x] reshape
  • [x] tanh
  • [x] sigmoid
  • [x] clip
  • [x] absval
  • [x] shufflechannel (shufflenet)

example

  • [x] squeezenet-gpu
  • [x] mobilenet-ssd-gpu
  • [x] mobilenet-yolov3-gpu

benchncnn

  • [x] shufflenet
  • [x] mobilenet-ssd / squeezenet-ssd
  • [x] mobilenet-yolo / mobilenet-yolov3

binary release

  • [x] vulkan-enabled android prebuild library
  • [x] vulkan-enabled ios prebuild framework (arm64 only)

documentation

  • [x] faq about common vulkan api error
  • [x] faq about packing
  • [x] faq about hybrid gpu/cpu inference practice
  • [x] faq about op fusion
enhancement

Most helpful comment

All 26 comments

great work

什么时候发布啊,有具体时间?

什么时候发布啊,有具体时间?

这些task做完了大概就快发布了,没设定时间,应该不会很久。。。

目前的结构貌似还不支持GPU/CPU混用的layer结构,这部分是否需要先做调整才能用到其他的网络模型呢?

目前的结构貌似还不支持GPU/CPU混用的layer结构,这部分是否需要先做调整才能用到其他的网络模型呢?

可以混用,搞完了会写个如何混用的 faq ...

very much excited about this.
Any update guys? Thanks

什么时候Android gpu构建发布?
谢谢你的努力

very much excited about this.
Any update guys? Thanks

The overall architecture of ncnn vulkan support is near ready, most common CNN operations have been implemented with vulkan compute, all examples in ncnn already work on gpu. And for these layers without vulkan support, inference engine will automatically fallback to cpu path.

minor api polish and more device testing are being done atm.
documentation is lacking

Hello, I have compiled library for android with vulkan support. I used NDK-r18b as given in steps.
I was trying to integrate it with one older ncnn android example by replacing libcnn.a and other include directory files.
But I am facing following error. :
I tried to run it with both r18b and r15c NDKs, had different errors both times.

error while using -r15c NDK.:

Build command failed.
Error while executing process /Users/soham/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/.externalNativeBuild/cmake/debug/arm64-v8a --target mtcnn}
[1/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o
[2/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o
FAILED: /Users/soham/Desktop/android-ndk-r15c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/Users/soham/Desktop/android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/soham/Desktop/android-ndk-r15c/sysroot -Dmtcnn_EXPORTS -I../../../../src/main/cpp/include -I../../../../src/main/cpp -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o -MF CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o.d -o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o -c /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:109:5: error: unknown type name 'PFN_vkGetImageMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageMemoryRequirements'?
PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
^~~~~~~~
PFN_vkGetImageMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2429:26: note: 'PFN_vkGetImageMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:110:5: error: unknown type name 'PFN_vkGetBufferMemoryRequirements2KHR'; did you mean 'PFN_vkGetBufferMemoryRequirements'?
PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
^~~~~~~~~
PFN_vkGetBufferMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2428:26: note: 'PFN_vkGetBufferMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:111:5: error: unknown type name 'PFN_vkGetImageSparseMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageSparseMemoryRequirements'?
PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR;
^~~~~~~~~~
PFN_vkGetImageSparseMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2430:26: note: 'PFN_vkGetImageSparseMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
^
3 errors generated.
FAILED: /Users/soham/Desktop/android-ndk-r15c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/Users/soham/Desktop/android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/soham/Desktop/android-ndk-r15c/sysroot -Dmtcnn_EXPORTS -I../../../../src/main/cpp/include -I../../../../src/main/cpp -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o -MF CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o.d -o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o -c /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:109:5: error: unknown type name 'PFN_vkGetImageMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageMemoryRequirements'?
PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
^~~~~~~~
PFN_vkGetImageMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2429:26: note: 'PFN_vkGetImageMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:110:5: error: unknown type name 'PFN_vkGetBufferMemoryRequirements2KHR'; did you mean 'PFN_vkGetBufferMemoryRequirements'?
PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
^~~~~~~~~
PFN_vkGetBufferMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2428:26: note: 'PFN_vkGetBufferMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:111:5: error: unknown type name 'PFN_vkGetImageSparseMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageSparseMemoryRequirements'?
PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR;
^~~~~~~~~~
PFN_vkGetImageSparseMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2430:26: note: 'PFN_vkGetImageSparseMemoryRequirements' declared here
typedef void (VKAPI_PTR PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
^
3 errors generated.
ninja: build stopped: subcommand failed.

Error while using r18b

Build command failed.
Error while executing process /Users/soham/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/.externalNativeBuild/cmake/debug/arm64-v8a --target mtcnn}
[1/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o
[2/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o
[3/3] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/arm64-v8a/libmtcnn.so
FAILED: : && /Users/soham/Desktop/android-ndk-r18b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/soham/Desktop/android-ndk-r18b/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/soham/Desktop/android-ndk-r18b/sysroot -fPIC -isystem /Users/soham/Desktop/android-ndk-r18b/sysroot/usr/include/aarch64-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /Users/soham/Desktop/android-ndk-r18b/platforms/android-21/arch-arm64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/Users/soham/Desktop/android-ndk-r18b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmtcnn.so -o ../../../../build/intermediates/cmake/debug/obj/arm64-v8a/libmtcnn.so CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o ../../../../src/main/jniLibs/arm64-v8a/libncnn.a -ljnigraphics -lz -llog -latomic -lm "/Users/soham/Desktop/android-ndk-r18b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a" "/Users/soham/Desktop/android-ndk-r18b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a" && :
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(cpu.cpp.o): In function ncnn::set_cpu_powersave(int)': cpu.cpp:(.text._ZN4ncnn17set_cpu_powersaveEi+0x51c): undefined reference tostderr'
cpu.cpp:(.text._ZN4ncnn17set_cpu_powersaveEi+0x520): undefined reference to stderr' cpu.cpp:(.text._ZN4ncnn17set_cpu_powersaveEi+0x6fc): undefined reference tostderr'
cpu.cpp:(.text._ZN4ncnn17set_cpu_powersaveEi+0x700): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(cpu.cpp.o): In function.omp_outlined.':
cpu.cpp:(.text..omp_outlined.+0x9c): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(cpu.cpp.o):cpu.cpp:(.text..omp_outlined.+0xa0): more undefined references tostderr' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkAllocator::create_buffer(unsigned long, unsigned int)': allocator.cpp:(.text._ZN4ncnn11VkAllocator13create_bufferEmj+0x50): undefined reference tovkCreateBuffer'
allocator.cpp:(.text._ZN4ncnn11VkAllocator13create_bufferEmj+0x7c): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn11VkAllocator13create_bufferEmj+0x80): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkAllocator::allocate_memory(unsigned long, unsigned int)': allocator.cpp:(.text._ZN4ncnn11VkAllocator15allocate_memoryEmj+0x44): undefined reference tovkAllocateMemory'
allocator.cpp:(.text._ZN4ncnn11VkAllocator15allocate_memoryEmj+0x70): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn11VkAllocator15allocate_memoryEmj+0x74): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkAllocator::allocate_dedicated_memory(unsigned long, unsigned int, VkBuffer_T*)': allocator.cpp:(.text._ZN4ncnn11VkAllocator25allocate_dedicated_memoryEmjP10VkBuffer_T+0x5c): undefined reference tovkAllocateMemory'
allocator.cpp:(.text._ZN4ncnn11VkAllocator25allocate_dedicated_memoryEmjP10VkBuffer_T+0x88): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn11VkAllocator25allocate_dedicated_memoryEmjP10VkBuffer_T+0x8c): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkUnlockedBlobBufferAllocator::clear()': allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x40): undefined reference tovkUnmapMemory'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x54): undefined reference to vkDestroyBuffer' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x68): undefined reference tovkFreeMemory'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkUnlockedBlobBufferAllocator::fastMalloc(unsigned long)': allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x184): undefined reference tovkCreateBuffer'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1a0): undefined reference to vkGetBufferMemoryRequirements' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1d8): undefined reference tovkAllocateMemory'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1f8): undefined reference to vkBindBufferMemory' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x224): undefined reference tovkMapMemory'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x464): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x468): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x488): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x48c): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkUnlockedBlobBufferAllocator::fastFree(ncnn::VkBufferMemory*)': allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x6c): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o):allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x70): more undefined references to stderr' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightBufferAllocator::clear()':
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x48): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x5c): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x70): undefined reference to vkFreeMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xc4): undefined reference tovkUnmapMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xd8): undefined reference to vkDestroyBuffer' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xec): undefined reference tovkFreeMemory'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkWeightBufferAllocator::fastMalloc(unsigned long)': allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0xd4): undefined reference tovkCreateBuffer'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x198): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x1b8): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x1e4): undefined reference to vkMapMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x270): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2a8): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2c8): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2f4): undefined reference to vkMapMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x4dc): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x4e0): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x5a8): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x5ac): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x5d4): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o):allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x5d8): more undefined references to stderr' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedStagingBufferAllocator::clear()':
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x44): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x58): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x6c): undefined reference to vkFreeMemory' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedStagingBufferAllocator::fastMalloc(unsigned long)':
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0xb4): undefined reference to vkCreateBuffer' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0xd0): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x104): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x124): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x148): undefined reference to vkMapMemory' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x1b0): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x1b4): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x1d4): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x1d8): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightStagingBufferAllocator::fastMalloc(unsigned long)':
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x78): undefined reference to vkCreateBuffer' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x98): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0xcc): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0xf0): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x114): undefined reference to vkMapMemory' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x14c): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x150): undefined reference to stderr' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x170): undefined reference tostderr'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x174): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightStagingBufferAllocator::fastFree(ncnn::VkBufferMemory)':
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x20): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x34): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x48): undefined reference to vkFreeMemory' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::Command::Command(ncnn::VulkanDevice const
, unsigned int)':
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x38): undefined reference to vkGetDeviceQueue' command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x68): undefined reference tovkCreateCommandPool'
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x9c): undefined reference to vkAllocateCommandBuffers' command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0xc8): undefined reference tovkCreateFence'
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0xf0): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0xf4): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x110): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x114): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x130): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x134): more undefined references tostderr' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::create_command_pool()': command.cpp:(.text._ZN4ncnn7Command19create_command_poolEv+0x4c): undefined reference tovkCreateCommandPool'
command.cpp:(.text._ZN4ncnn7Command19create_command_poolEv+0x7c): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command19create_command_poolEv+0x80): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::create_command_buffer()': command.cpp:(.text._ZN4ncnn7Command21create_command_bufferEv+0x4c): undefined reference tovkAllocateCommandBuffers'
command.cpp:(.text._ZN4ncnn7Command21create_command_bufferEv+0x7c): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command21create_command_bufferEv+0x80): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::~Command()': command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x20): undefined reference tovkDestroyFence'
command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x38): undefined reference to vkFreeCommandBuffers' command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x54): undefined reference tovkDestroyCommandPool'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::begin_command_buffer()': command.cpp:(.text._ZN4ncnn7Command20begin_command_bufferEv+0x3c): undefined reference tovkBeginCommandBuffer'
command.cpp:(.text._ZN4ncnn7Command20begin_command_bufferEv+0x6c): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command20begin_command_bufferEv+0x70): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::end_command_buffer()': command.cpp:(.text._ZN4ncnn7Command18end_command_bufferEv+0xc): undefined reference tovkEndCommandBuffer'
command.cpp:(.text._ZN4ncnn7Command18end_command_bufferEv+0x24): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command18end_command_bufferEv+0x28): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::queue_submit()': command.cpp:(.text._ZN4ncnn7Command12queue_submitEv+0x5c): undefined reference tovkQueueSubmit'
command.cpp:(.text._ZN4ncnn7Command12queue_submitEv+0x8c): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command12queue_submitEv+0x90): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::Command::wait_fence()': command.cpp:(.text._ZN4ncnn7Command10wait_fenceEv+0x20): undefined reference tovkWaitForFences'
command.cpp:(.text._ZN4ncnn7Command10wait_fenceEv+0x38): undefined reference to stderr' command.cpp:(.text._ZN4ncnn7Command10wait_fenceEv+0x3c): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::VkCompute(ncnn::VulkanDevice const*)': command.cpp:(.text._ZN4ncnn9VkComputeC2EPKNS_12VulkanDeviceE+0x6c): undefined reference tovkBeginCommandBuffer'
command.cpp:(.text._ZN4ncnn9VkComputeC2EPKNS_12VulkanDeviceE+0x94): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkComputeC2EPKNS_12VulkanDeviceE+0x98): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::~VkCompute()': command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x5c): undefined reference tovkFreeDescriptorSets'
command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x74): undefined reference to vkDestroyDescriptorPool' command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x110): undefined reference tovkDestroyFence'
command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x128): undefined reference to vkFreeCommandBuffers' command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x148): undefined reference tovkDestroyCommandPool'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_upload(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute13record_uploadERKNS_5VkMatE+0xa8): undefined reference tovkCmdCopyBuffer'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::copy_buffer(VkBuffer_T*, unsigned long, VkBuffer_T*, unsigned long, unsigned long)': command.cpp:(.text._ZN4ncnn9VkCompute11copy_bufferEP10VkBuffer_TmS2_mm+0x38): undefined reference tovkCmdCopyBuffer'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_download(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute15record_downloadERKNS_5VkMatE+0xa8): undefined reference tovkCmdCopyBuffer'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_clone(ncnn::VkMat const&, ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute12record_cloneERKNS_5VkMatES3_+0xa4): undefined reference tovkCmdCopyBuffer'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_copy_regions(ncnn::VkMat const&, ncnn::VkMat const&, std::__ndk1::vector<VkBufferCopy, std::__ndk1::allocator<VkBufferCopy> > const&)': command.cpp:(.text._ZN4ncnn9VkCompute19record_copy_regionsERKNS_5VkMatES3_RKNSt6__ndk16vectorI12VkBufferCopyNS4_9allocatorIS6_EEEE+0x94): undefined reference tovkCmdCopyBuffer'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn9VkCompute19copy_buffer_regionsEP10VkBuffer_TS2_RKNSt6__ndk16vectorI12VkBufferCopyNS3_9allocatorIS5_EEEE+0x1c): more undefined references to vkCmdCopyBuffer' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_bind_pipeline(VkPipeline_T)':
command.cpp:(.text._ZN4ncnn9VkCompute20record_bind_pipelineEP12VkPipeline_T+0x44): undefined reference to vkCmdBindPipeline' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_update_bindings(VkPipelineLayout_T
, VkDescriptorSetLayout_T, VkDescriptorUpdateTemplate_T, std::__ndk1::vector > const&)':
command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x170): undefined reference to vkCreateDescriptorPool' command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x274): undefined reference tovkAllocateDescriptorSets'
command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x430): undefined reference to vkUpdateDescriptorSets' command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x600): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x604): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x624): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x628): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_push_constants(VkPipelineLayout_T, std::__ndk1::vector > const&)':
command.cpp:(.text._ZN4ncnn9VkCompute21record_push_constantsEP18VkPipelineLayout_TRKNSt6__ndk16vectorINS_16vk_constant_typeENS3_9allocatorIS5_EEEE+0x54): undefined reference to vkCmdPushConstants' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_dispatch(unsigned int const
)':
command.cpp:(.text._ZN4ncnn9VkCompute15record_dispatchEPKj+0x48): undefined reference to vkCmdDispatch' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::bind_pipeline(VkPipeline_T)':
command.cpp:(.text._ZN4ncnn9VkCompute13bind_pipelineEP12VkPipeline_T+0xc): undefined reference to vkCmdBindPipeline' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::push_constants(VkPipelineLayout_T
, std::__ndk1::vector > const&)':
command.cpp:(.text._ZN4ncnn9VkCompute14push_constantsEP18VkPipelineLayout_TRKNSt6__ndk16vectorINS_16vk_constant_typeENS3_9allocatorIS5_EEEE+0x1c): undefined reference to vkCmdPushConstants' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::dispatch(unsigned int const)':
command.cpp:(.text._ZN4ncnn9VkCompute8dispatchEPKj+0x10): undefined reference to vkCmdDispatch' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_transfer_compute_barrier(ncnn::VkMat const&)':
command.cpp:(.text._ZN4ncnn9VkCompute31record_transfer_compute_barrierERKNS_5VkMatE+0xac): undefined reference to vkCmdPipelineBarrier' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::transfer_compute_barrier(VkBuffer_T
, unsigned long, unsigned long)':
command.cpp:(.text._ZN4ncnn9VkCompute24transfer_compute_barrierEP10VkBuffer_Tmm+0x64): undefined reference to vkCmdPipelineBarrier' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_compute_transfer_barrier(ncnn::VkMat const&)':
command.cpp:(.text._ZN4ncnn9VkCompute31record_compute_transfer_barrierERKNS_5VkMatE+0xac): undefined reference to vkCmdPipelineBarrier' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::compute_transfer_barrier(VkBuffer_T, unsigned long, unsigned long)':
command.cpp:(.text._ZN4ncnn9VkCompute24compute_transfer_barrierEP10VkBuffer_Tmm+0x64): undefined reference to vkCmdPipelineBarrier' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::record_compute_compute_barrier(ncnn::VkMat const&)':
command.cpp:(.text._ZN4ncnn9VkCompute30record_compute_compute_barrierERKNS_5VkMatE+0xac): undefined reference to vkCmdPipelineBarrier' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn9VkCompute23compute_compute_barrierEP10VkBuffer_Tmm+0x64): more undefined references tovkCmdPipelineBarrier' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::submit()': command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x48): undefined reference tovkEndCommandBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x50): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x54): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x94): undefined reference to vkBeginCommandBuffer' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x13c): undefined reference tovkCmdCopyBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x168): undefined reference to vkCmdPushConstants' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x1b0): undefined reference tovkCmdBindPipeline'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x1e0): undefined reference to vkCmdBindDescriptorSets' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x238): undefined reference tovkCmdCopyBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x250): undefined reference to vkCmdDispatch' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x2d0): undefined reference tovkCmdPipelineBarrier'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x2f8): undefined reference to vkEndCommandBuffer' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x378): undefined reference tovkQueueSubmit'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x3b8): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x3bc): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x3e8): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x3ec): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x414): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn9VkCompute6submitEv+0x418): more undefined references tostderr' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::bind_descriptorset(VkPipelineLayout_T*, VkDescriptorSet_T*)': command.cpp:(.text._ZN4ncnn9VkCompute18bind_descriptorsetEP18VkPipelineLayout_TP17VkDescriptorSet_T+0x40): undefined reference tovkCmdBindDescriptorSets'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::wait()': command.cpp:(.text._ZN4ncnn9VkCompute4waitEv+0x20): undefined reference tovkWaitForFences'
command.cpp:(.text._ZN4ncnn9VkCompute4waitEv+0x38): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute4waitEv+0x3c): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::reset()': command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x28): undefined reference tovkResetCommandBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x40): undefined reference to vkResetFences' command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x78): undefined reference tovkBeginCommandBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xa4): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xa8): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xbc): undefined reference to stderr' command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xc0): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xf0): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0xf4): more undefined references tostderr' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkTransfer::~VkTransfer()': command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x28): undefined reference tovkDestroyFence'
command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x40): undefined reference to vkFreeCommandBuffers' command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x5c): undefined reference tovkDestroyCommandPool'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkTransfer::submit()': command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x1e0): undefined reference tovkBeginCommandBuffer'
command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x278): undefined reference to vkCmdCopyBuffer' command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x2b8): undefined reference tovkEndCommandBuffer'
command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x2f8): undefined reference to vkQueueSubmit' command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x338): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x33c): undefined reference to stderr' command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x360): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x364): undefined reference to stderr' command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x380): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o):command.cpp:(.text._ZN4ncnn10VkTransfer6submitEv+0x384): more undefined references to stderr' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::copy_buffer(VkBuffer_T
, unsigned long, VkBuffer_T, unsigned long, unsigned long)':
command.cpp:(.text._ZN4ncnn10VkTransfer11copy_bufferEP10VkBuffer_TmS2_mm+0x38): undefined reference to vkCmdCopyBuffer' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::wait()':
command.cpp:(.text._ZN4ncnn10VkTransfer4waitEv+0x40): undefined reference to vkWaitForFences' command.cpp:(.text._ZN4ncnn10VkTransfer4waitEv+0x260): undefined reference tostderr'
command.cpp:(.text._ZN4ncnn10VkTransfer4waitEv+0x264): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::copy_buffer_regions(VkBuffer_T
, VkBuffer_T, std::__ndk1::vector > const&)':
command.cpp:(.text._ZN4ncnn10VkTransfer19copy_buffer_regionsEP10VkBuffer_TS2_RKNSt6__ndk16vectorI12VkBufferCopyNS3_9allocatorIS5_EEEE+0x1c): undefined reference to vkCmdCopyBuffer' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::create_gpu_instance()':
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x40): undefined reference to vkEnumerateInstanceExtensionProperties' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x88): undefined reference tovkEnumerateInstanceExtensionProperties'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x208): undefined reference to vkCreateInstance' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x220): undefined reference tovkEnumeratePhysicalDevices'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x274): undefined reference to vkEnumeratePhysicalDevices' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x2c0): undefined reference tovkGetPhysicalDeviceProperties'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x36c): undefined reference to vkGetPhysicalDeviceQueueFamilyProperties' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x3b4): undefined reference tovkGetPhysicalDeviceQueueFamilyProperties'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x4d4): undefined reference to vkGetPhysicalDeviceMemoryProperties' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x6a0): undefined reference tovkEnumerateDeviceExtensionProperties'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x6ec): undefined reference to vkEnumerateDeviceExtensionProperties' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x9a0): undefined reference tostderr'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0x9a4): undefined reference to stderr' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0xa38): undefined reference tostderr'
gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0xa3c): undefined reference to stderr' gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0xa60): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o):gpu.cpp:(.text._ZN4ncnn19create_gpu_instanceEv+0xa64): more undefined references to stderr' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::destroy_gpu_instance()':
gpu.cpp:(.text._ZN4ncnn20destroy_gpu_instanceEv+0x10): undefined reference to vkDestroyInstance' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::VulkanDevice::VulkanDevice(int)':
gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0x8d8): undefined reference to vkCreateDevice' gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0x958): undefined reference tostderr'
gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0x95c): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::VulkanDevice::init_device_extension()':
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x28): undefined reference to vkGetDeviceProcAddr' gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x40): undefined reference tovkGetDeviceProcAddr'
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x58): undefined reference to vkGetDeviceProcAddr' gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x78): undefined reference tovkGetDeviceProcAddr'
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x90): undefined reference to vkGetDeviceProcAddr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o):gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0xa8): more undefined references tovkGetDeviceProcAddr' follow
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In function ncnn::VulkanDevice::create_shader_module()': gpu.cpp:(.text._ZN4ncnn12VulkanDevice20create_shader_moduleEv+0xa4): undefined reference tovkCreateShaderModule'
gpu.cpp:(.text._ZN4ncnn12VulkanDevice20create_shader_moduleEv+0xd8): undefined reference to stderr' gpu.cpp:(.text._ZN4ncnn12VulkanDevice20create_shader_moduleEv+0xdc): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In function ncnn::VulkanDevice::~VulkanDevice()': gpu.cpp:(.text._ZN4ncnn12VulkanDeviceD2Ev+0x5c): undefined reference tovkDestroyShaderModule'
gpu.cpp:(.text._ZN4ncnn12VulkanDeviceD2Ev+0x84): undefined reference to vkDestroyDevice' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::VulkanDevice::destroy_shader_module()':
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21destroy_shader_moduleEv+0x34): undefined reference to vkDestroyShaderModule' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::VulkanDevice::get_shader_module(char const
) const':
gpu.cpp:(.text._ZNK4ncnn12VulkanDevice17get_shader_moduleEPKc+0x44): undefined reference to stderr' gpu.cpp:(.text._ZNK4ncnn12VulkanDevice17get_shader_moduleEPKc+0x48): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(modelbin.cpp.o): In function ncnn::ModelBinFromStdio::load(int, int) const': modelbin.cpp:(.text._ZNK4ncnn17ModelBinFromStdio4loadEii+0x308): undefined reference tostderr'
modelbin.cpp:(.text._ZNK4ncnn17ModelBinFromStdio4loadEii+0x30c): undefined reference to stderr' modelbin.cpp:(.text._ZNK4ncnn17ModelBinFromStdio4loadEii+0x3a4): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(modelbin.cpp.o):modelbin.cpp:(.text._ZNK4ncnn17ModelBinFromStdio4loadEii+0x3a8): more undefined references to stderr' follow ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::destroy()':
pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x50): undefined reference to vkDestroyPipeline' pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x6c): undefined reference tovkDestroyPipelineLayout'
pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x88): undefined reference to vkDestroyDescriptorSetLayout' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::create(char const, std::__ndk1::vector > const&, int, int)':
pipeline.cpp:(.text._ZN4ncnn8Pipeline6createEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEEii+0xac): undefined reference to vkCreatePipelineLayout' pipeline.cpp:(.text._ZN4ncnn8Pipeline6createEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEEii+0x10c): undefined reference tostderr'
pipeline.cpp:(.text._ZN4ncnn8Pipeline6createEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEEii+0x110): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::create_descriptorset_layout(int)':
pipeline.cpp:(.text._ZN4ncnn8Pipeline27create_descriptorset_layoutEi+0x124): undefined reference to vkCreateDescriptorSetLayout' pipeline.cpp:(.text._ZN4ncnn8Pipeline27create_descriptorset_layoutEi+0x17c): undefined reference tostderr'
pipeline.cpp:(.text._ZN4ncnn8Pipeline27create_descriptorset_layoutEi+0x180): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::create_pipeline_layout(int)':
pipeline.cpp:(.text._ZN4ncnn8Pipeline22create_pipeline_layoutEi+0x88): undefined reference to vkCreatePipelineLayout' pipeline.cpp:(.text._ZN4ncnn8Pipeline22create_pipeline_layoutEi+0xb8): undefined reference tostderr'
pipeline.cpp:(.text._ZN4ncnn8Pipeline22create_pipeline_layoutEi+0xbc): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::create_pipeline(char const
, std::__ndk1::vector > const&)':
pipeline.cpp:(.text._ZN4ncnn8Pipeline15create_pipelineEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEE+0x2b0): undefined reference to vkCreateComputePipelines' pipeline.cpp:(.text._ZN4ncnn8Pipeline15create_pipelineEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEE+0x310): undefined reference tostderr'
pipeline.cpp:(.text._ZN4ncnn8Pipeline15create_pipelineEPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS3_9allocatorIS5_EEEE+0x314): undefined reference to stderr' ../../../../src/main/jniLibs/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::create_descriptor_update_template(int)':
pipeline.cpp:(.text._ZN4ncnn8Pipeline33create_descriptor_update_templateEi+0x1c4): undefined reference to stderr' pipeline.cpp:(.text._ZN4ncnn8Pipeline33create_descriptor_update_templateEi+0x1c8): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(convolution.cpp.o): In function ncnn::Convolution::load_model(ncnn::ModelBin const&)': convolution.cpp:(.text._ZN4ncnn11Convolution10load_modelERKNS_8ModelBinE+0x810): undefined reference tostderr'
../../../../src/main/jniLibs/arm64-v8a/libncnn.a(convolution.cpp.o):convolution.cpp:(.text._ZN4ncnn11Convolution10load_modelERKNS_8ModelBinE+0x814): more undefined references to `stderr' follow
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Do I need to add any more flags to build file for vulkan support?
Thanks

Hello, I have compiled library for android with vulkan support.
I was trying to integrate it with one older ncnn android example by replacing libcnn.a and other include directory files.
But I am facing following error. :
I am using -r15c NDK.

Build command failed.
Error while executing process /Users/soham/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/.externalNativeBuild/cmake/debug/arm64-v8a --target mtcnn}
[1/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o
[2/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o
FAILED: /Users/soham/Desktop/android-ndk-r15c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/Users/soham/Desktop/android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/soham/Desktop/android-ndk-r15c/sysroot -Dmtcnn_EXPORTS -I../../../../src/main/cpp/include -I../../../../src/main/cpp -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o -MF CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o.d -o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o -c /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:109:5: error: unknown type name 'PFN_vkGetImageMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageMemoryRequirements'?
PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
^~~~~~~~
PFN_vkGetImageMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2429:26: note: 'PFN_vkGetImageMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements_ pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:110:5: error: unknown type name 'PFN_vkGetBufferMemoryRequirements2KHR'; did you mean 'PFN_vkGetBufferMemoryRequirements'?
PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
^~~~~~~~~
PFN_vkGetBufferMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2428:26: note: 'PFN_vkGetBufferMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements_ pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn_jni.cpp:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:111:5: error: unknown type name 'PFN_vkGetImageSparseMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageSparseMemoryRequirements'?
PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR;
^~~~~~~~~~
PFN_vkGetImageSparseMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2430:26: note: 'PFN_vkGetImageSparseMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t_ pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
^
3 errors generated.
FAILED: /Users/soham/Desktop/android-ndk-r15c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/Users/soham/Desktop/android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/soham/Desktop/android-ndk-r15c/sysroot -Dmtcnn_EXPORTS -I../../../../src/main/cpp/include -I../../../../src/main/cpp -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem /Users/soham/Desktop/android-ndk-r15c/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o -MF CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o.d -o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o -c /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:109:5: error: unknown type name 'PFN_vkGetImageMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageMemoryRequirements'?
PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
^~~~~~~~
PFN_vkGetImageMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2429:26: note: 'PFN_vkGetImageMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements_ pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:110:5: error: unknown type name 'PFN_vkGetBufferMemoryRequirements2KHR'; did you mean 'PFN_vkGetBufferMemoryRequirements'?
PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
^~~~~~~~~
PFN_vkGetBufferMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2428:26: note: 'PFN_vkGetBufferMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements_ pMemoryRequirements);
^
In file included from /Users/soham/Desktop/mtcnn_ncnn-masterNew/mtcnn_ASNewcopy/app/src/main/cpp/mtcnn.cpp:9:
In file included from ../../../../src/main/cpp/mtcnn.h:8:
In file included from ../../../../src/main/cpp/include/net.h:21:
In file included from ../../../../src/main/cpp/include/layer.h:21:
In file included from ../../../../src/main/cpp/include/mat.h:25:
In file included from ../../../../src/main/cpp/include/allocator.h:32:
../../../../src/main/cpp/include/gpu.h:111:5: error: unknown type name 'PFN_vkGetImageSparseMemoryRequirements2KHR'; did you mean 'PFN_vkGetImageSparseMemoryRequirements'?
PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR;
^~~~~~~~~~
PFN_vkGetImageSparseMemoryRequirements
/Users/soham/Desktop/android-ndk-r15c/sysroot/usr/include/vulkan/vulkan.h:2430:26: note: 'PFN_vkGetImageSparseMemoryRequirements' declared here
typedef void (VKAPI_PTR _PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t_ pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
^
3 errors generated.
ninja: build stopped: subcommand failed.

android-ndk-r18b should be fine
https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-android

after proper working, I would like to contribute by adding gpu enabled example here.

I did tried ndk-r18b but had some errors. I have updated those error in above comment.
Do I need to add any more flags to build.gradle or to cmakelist file for vulkan support?
Thanks.

Here are my cmakeList and build.gradle files.

cmakeList:
cmake_minimum_required(VERSION 3.4.1)

include头文件目录

include_directories(src/main/cpp/include
src/main/cpp/)

source directory源文件目录

file(GLOB MTCNN_SRC src/main/cpp/.h
src/main/cpp/
.cpp)
set(MTCNN_COMPILE_CODE ${MTCNN_SRC})

添加ncnn库

add_library(libncnn STATIC IMPORTED )
set_target_properties(libncnn
PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libncnn.a)

编译为动态库

add_library(mtcnn SHARED ${MTCNN_COMPILE_CODE})

添加工程所依赖的库

find_library( log-lib log )
target_link_libraries( mtcnn
libncnn
jnigraphics
z
${log-lib} )

gradle:
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.mtcnn_as"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a' //,'x86', 'x86_64', 'armeabi', 'arm64-v8a'
stl "gnustl_static"
}
externalNativeBuild {
cmake {
arguments "-DANDROID_TOOLCHAIN=clang"
cFlags "-fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math "
cppFlags "-fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math "
cppFlags ""
cppFlags "-std=c++11"
cppFlags "-frtti"
cppFlags "-fexceptions"
}
}

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
externalNativeBuild {
    cmake {
        path "CMakeLists.txt"
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
}

@soham24
use "libc++_static" stl instead of "gnustl_static"

@nihui Can I expect any android sample example which uses vulkan sdk

@nihui Thanks for your quick replies and help. but still, I am receiving the same error.
I think its just error of NDK and cmake miss-config, as I have successfully buiild sdk with vulkan support.
To make sure we are on same page, can you let me know the ideal cmake version to be used at the time of build as well as at the time of integrating it into android.?

@nihui

@soham24

here is my application.mk

APP_STL := c++_static
APP_ABI := armeabi-v7a arm64-v8a
APP_PLATFORM := android-24

@nihui thank you. though I have not used android.mk NDK to build .so modules for app. (I have always used cmakelist for it.) but I will surely try to build it with android.mk

@soham24 gpu inference feature will be added to the squeezencnn example soon, you may take it as a reference

@nihui thank you so much :D

@nihui thank you so much You are saviour

@nihui it turned out I was just missing vulkan keyword from cmakelist config.
after getting reference from your example I have added it to it.
and its working :)
target_link_libraries( mtcnn
libncnn
jnigraphics
vulkan
z
${log-lib} )

新常见问题
https://github.com/Tencent/ncnn/wiki/FAQ-ncnn-vulkan
你好,你这边有mobilenetv3-yolov3-lite相关支持版本吗?
如果有,麻烦发我一份,谢谢!!!
[email protected]

@nihui 用NDK18 编译NCNN库仍然编译不过:
Build command failed.
Error while executing process D:Thunder9android-ndk-r18bndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=...srcmainjniAndroid.mk NDK_APPLICATION_MK=...srcmainjniApplication.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-24 NDK_OUT=../../../build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=...buildintermediatesndkBuilddebuglib ../../../build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libPortrait.so}
[arm64-v8a] SharedLibrary : libPortrait.so
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(gpu.cpp.o): In function ncnn::VulkanDevice::VulkanDevice(int)': gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0x9d8): undefined reference tovkCreateDevice'
gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0xa58): undefined reference to vkGetDeviceQueue' gpu.cpp:(.text._ZN4ncnn12VulkanDeviceC2Ei+0xae0): undefined reference tovkGetDeviceQueue'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(gpu.cpp.o): In function ncnn::VulkanDevice::init_device_extension()': gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x28): undefined reference tovkGetDeviceProcAddr'
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x40): undefined reference to vkGetDeviceProcAddr' gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x58): undefined reference tovkGetDeviceProcAddr'
gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x78): undefined reference to vkGetDeviceProcAddr' gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0x90): undefined reference tovkGetDeviceProcAddr'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(gpu.cpp.o):gpu.cpp:(.text._ZN4ncnn12VulkanDevice21init_device_extensionEv+0xa8): more undefined references to vkGetDeviceProcAddr' follow ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(gpu.cpp.o): In functionncnn::VulkanDevice::create_shader_module()':
gpu.cpp:(.text._ZN4ncnn12VulkanDevice20create_shader_moduleEv+0x158): undefined reference to vkCreateShaderModule' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedBlobBufferAllocator::clear()':
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x40): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x54): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator5clearEv+0x68): undefined reference to vkFreeMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedBlobBufferAllocator::fastMalloc(unsigned long)':
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x184): undefined reference to vkCreateBuffer' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1a0): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1d8): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x1f8): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn29VkUnlockedBlobBufferAllocator10fastMallocEm+0x224): undefined reference to vkMapMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightBufferAllocator::clear()':
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x48): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x5c): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0x70): undefined reference to vkFreeMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xc4): undefined reference tovkUnmapMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xd8): undefined reference to vkDestroyBuffer' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator5clearEv+0xec): undefined reference tovkFreeMemory'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In function ncnn::VkWeightBufferAllocator::fastMalloc(unsigned long)': allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0xd4): undefined reference tovkCreateBuffer'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x198): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x1b8): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x1e4): undefined reference to vkMapMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x270): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2a8): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2c8): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn23VkWeightBufferAllocator10fastMallocEm+0x2f4): undefined reference to vkMapMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedStagingBufferAllocator::clear()':
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x44): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x58): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator5clearEv+0x6c): undefined reference to vkFreeMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkUnlockedStagingBufferAllocator::fastMalloc(unsigned long)':
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0xb4): undefined reference to vkCreateBuffer' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0xd0): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x104): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x124): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn32VkUnlockedStagingBufferAllocator10fastMallocEm+0x148): undefined reference to vkMapMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightStagingBufferAllocator::fastMalloc(unsigned long)':
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x78): undefined reference to vkCreateBuffer' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x98): undefined reference tovkGetBufferMemoryRequirements'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0xcc): undefined reference to vkAllocateMemory' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0xf0): undefined reference tovkBindBufferMemory'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator10fastMallocEm+0x114): undefined reference to vkMapMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(allocator.cpp.o): In functionncnn::VkWeightStagingBufferAllocator::fastFree(ncnn::VkBufferMemory)':
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x20): undefined reference to vkUnmapMemory' allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x34): undefined reference tovkDestroyBuffer'
allocator.cpp:(.text._ZN4ncnn30VkWeightStagingBufferAllocator8fastFreeEPNS_14VkBufferMemoryE+0x48): undefined reference to vkFreeMemory' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::Command::Command(ncnn::VulkanDevice const
, unsigned int)':
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x54): undefined reference to vkCreateCommandPool' command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0x88): undefined reference tovkAllocateCommandBuffers'
command.cpp:(.text._ZN4ncnn7CommandC2EPKNS_12VulkanDeviceEj+0xb4): undefined reference to vkCreateFence' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::Command::~Command()':
command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x2c): undefined reference to vkDestroyFence' command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x44): undefined reference tovkFreeCommandBuffers'
command.cpp:(.text._ZN4ncnn7CommandD2Ev+0x60): undefined reference to vkDestroyCommandPool' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::Command::~Command()':
command.cpp:(.text._ZN4ncnn7CommandD0Ev+0x2c): undefined reference to vkDestroyFence' command.cpp:(.text._ZN4ncnn7CommandD0Ev+0x44): undefined reference tovkFreeCommandBuffers'
command.cpp:(.text._ZN4ncnn7CommandD0Ev+0x58): undefined reference to vkDestroyCommandPool' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::Command::queue_submit_and_wait_fence()':
command.cpp:(.text._ZN4ncnn7Command27queue_submit_and_wait_fenceEv+0x74): undefined reference to vkQueueSubmit' command.cpp:(.text._ZN4ncnn7Command27queue_submit_and_wait_fenceEv+0x94): undefined reference tovkWaitForFences'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::VkCompute(ncnn::VulkanDevice const*)': command.cpp:(.text._ZN4ncnn9VkComputeC2EPKNS_12VulkanDeviceE+0x7c): undefined reference tovkBeginCommandBuffer'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::~VkCompute()': command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x68): undefined reference tovkFreeDescriptorSets'
command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x80): undefined reference to vkDestroyDescriptorPool' command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x128): undefined reference tovkDestroyFence'
command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x140): undefined reference to vkFreeCommandBuffers' command.cpp:(.text._ZN4ncnn9VkComputeD2Ev+0x160): undefined reference tovkDestroyCommandPool'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_upload(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute13record_uploadERKNS_5VkMatE+0xa8): undefined reference tovkCmdCopyBuffer'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_download(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute15record_downloadERKNS_5VkMatE+0xa8): undefined reference tovkCmdCopyBuffer'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_clone(ncnn::VkMat const&, ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute12record_cloneERKNS_5VkMatES3_+0xc8): undefined reference tovkCmdCopyBuffer'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_bind_pipeline(VkPipeline_T*)': command.cpp:(.text._ZN4ncnn9VkCompute20record_bind_pipelineEP12VkPipeline_T+0x44): undefined reference tovkCmdBindPipeline'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_update_bindings(VkPipelineLayout_T*, VkDescriptorSetLayout_T*, VkDescriptorUpdateTemplate_T*, std::__ndk1::vector<ncnn::VkMat, std::__ndk1::allocator<ncnn::VkMat> > const&)': command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x168): undefined reference tovkCreateDescriptorPool'
command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x268): undefined reference to vkAllocateDescriptorSets' command.cpp:(.text._ZN4ncnn9VkCompute22record_update_bindingsEP18VkPipelineLayout_TP23VkDescriptorSetLayout_TP28VkDescriptorUpdateTemplate_TRKNSt6__ndk16vectorINS_5VkMatENS7_9allocatorIS9_EEEE+0x420): undefined reference tovkUpdateDescriptorSets'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_push_constants(VkPipelineLayout_T*, std::__ndk1::vector<ncnn::vk_constant_type, std::__ndk1::allocator<ncnn::vk_constant_type> > const&)': command.cpp:(.text._ZN4ncnn9VkCompute21record_push_constantsEP18VkPipelineLayout_TRKNSt6__ndk16vectorINS_16vk_constant_typeENS3_9allocatorIS5_EEEE+0x54): undefined reference tovkCmdPushConstants'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_dispatch(unsigned int const*)': command.cpp:(.text._ZN4ncnn9VkCompute15record_dispatchEPKj+0x48): undefined reference tovkCmdDispatch'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_transfer_compute_barrier(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute31record_transfer_compute_barrierERKNS_5VkMatE+0xac): undefined reference tovkCmdPipelineBarrier'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_compute_transfer_barrier(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute31record_compute_transfer_barrierERKNS_5VkMatE+0xac): undefined reference tovkCmdPipelineBarrier'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_compute_compute_barrier(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute30record_compute_compute_barrierERKNS_5VkMatE+0xac): undefined reference tovkCmdPipelineBarrier'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::record_transfer_transfer_barrier(ncnn::VkMat const&)': command.cpp:(.text._ZN4ncnn9VkCompute32record_transfer_transfer_barrierERKNS_5VkMatE+0xac): undefined reference tovkCmdPipelineBarrier'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In function ncnn::VkCompute::submit_and_wait()': command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x40): undefined reference tovkEndCommandBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x88): undefined reference to vkBeginCommandBuffer' command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x130): undefined reference tovkCmdCopyBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x15c): undefined reference to vkCmdPushConstants' command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x1a4): undefined reference tovkCmdBindPipeline'
command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x1d4): undefined reference to vkCmdBindDescriptorSets' command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x22c): undefined reference tovkCmdCopyBuffer'
command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x244): undefined reference to vkCmdDispatch' command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x2c4): undefined reference tovkCmdPipelineBarrier'
command.cpp:(.text._ZN4ncnn9VkCompute15submit_and_waitEv+0x2ec): undefined reference to vkEndCommandBuffer' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkCompute::reset()':
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x28): undefined reference to vkResetCommandBuffer' command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x40): undefined reference tovkResetFences'
command.cpp:(.text._ZN4ncnn9VkCompute5resetEv+0x78): undefined reference to vkBeginCommandBuffer' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::~VkTransfer()':
command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x3c): undefined reference to vkDestroyFence' command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x54): undefined reference tovkFreeCommandBuffers'
command.cpp:(.text._ZN4ncnn10VkTransferD2Ev+0x70): undefined reference to vkDestroyCommandPool' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::~VkTransfer()':
command.cpp:(.text._ZN4ncnn10VkTransferD0Ev+0x3c): undefined reference to vkDestroyFence' command.cpp:(.text._ZN4ncnn10VkTransferD0Ev+0x54): undefined reference tovkFreeCommandBuffers'
command.cpp:(.text._ZN4ncnn10VkTransferD0Ev+0x68): undefined reference to vkDestroyCommandPool' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(command.cpp.o): In functionncnn::VkTransfer::submit_and_wait()':
command.cpp:(.text._ZN4ncnn10VkTransfer15submit_and_waitEv+0x1c0): undefined reference to vkBeginCommandBuffer' command.cpp:(.text._ZN4ncnn10VkTransfer15submit_and_waitEv+0x20c): undefined reference tovkCmdCopyBuffer'
command.cpp:(.text._ZN4ncnn10VkTransfer15submit_and_waitEv+0x23c): undefined reference to vkEndCommandBuffer' ../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(pipeline.cpp.o): In functionncnn::Pipeline::destroy()':
pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x50): undefined reference to vkDestroyPipeline' pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x6c): undefined reference tovkDestroyPipelineLayout'
pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0x88): undefined reference to vkDestroyDescriptorSetLayout' pipeline.cpp:(.text._ZN4ncnn8Pipeline7destroyEv+0xa4): undefined reference tovkDestroyShaderModule'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(pipeline.cpp.o): In function ncnn::Pipeline::create(VkShaderModule_T*, char const*, std::__ndk1::vector<ncnn::vk_specialization_type, std::__ndk1::allocator<ncnn::vk_specialization_type> > const&, int, int)': pipeline.cpp:(.text._ZN4ncnn8Pipeline6createEP16VkShaderModule_TPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS5_9allocatorIS7_EEEEii+0xb4): undefined reference tovkCreatePipelineLayout'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(pipeline.cpp.o): In function ncnn::Pipeline::create_descriptorset_layout(int)': pipeline.cpp:(.text._ZN4ncnn8Pipeline27create_descriptorset_layoutEi+0x140): undefined reference tovkCreateDescriptorSetLayout'
../../../src/main/jni/ncnn-lib/arm64-v8a/libncnn.a(pipeline.cpp.o): In function ncnn::Pipeline::create_pipeline(VkShaderModule_T*, char const*, std::__ndk1::vector<ncnn::vk_specialization_type, std::__ndk1::allocator<ncnn::vk_specialization_type> > const&)': pipeline.cpp:(.text._ZN4ncnn8Pipeline15create_pipelineEP16VkShaderModule_TPKcRKNSt6__ndk16vectorINS_22vk_specialization_typeENS5_9allocatorIS7_EEEE+0x2a0): undefined reference tovkCreateComputePipelines'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make: * [../../../build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libPortrait.so] Error 1
望指点,谢谢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

makaaay picture makaaay  ·  4Comments

AlexeyAB picture AlexeyAB  ·  3Comments

zsliaoming picture zsliaoming  ·  3Comments

baiyecha picture baiyecha  ·  3Comments

ghost picture ghost  ·  3Comments