[EXPERIMENTAL] Demo of using PyTorch 1.0 inside an Android app. Test with your own deep neural network such as ResNet18/SqueezeNet/MobileNet v2 and a phone camera.
Build command failed.
Error while executing process /home/yxchng/Android/Sdk/cmake/3.10.2.4988404/bin/cmake with arguments {--build /home/yxchng/git/new3/pytorch-android/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target native-lib}
[1/4] Building C object CMakeFiles/cpufeatures.dir/home/yxchng/Android/Sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c.o
[2/4] Linking C static library libcpufeatures.a
[3/4] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
FAILED: CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi22 --gcc-toolchain=/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/yxchng/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dnative_lib_EXPORTS -I/home/yxchng/Android/Sdk/ndk-bundle/sources/android/cpufeatures -I../../../../src/main/cpp -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++ -frtti -fexceptions -std=c++11 -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c ../../../../src/main/cpp/native-lib.cpp
In file included from ../../../../src/main/cpp/native-lib.cpp:8:
In file included from ../../../../src/main/cpp/caffe2/core/operator.h:18:
In file included from ../../../../src/main/cpp/caffe2/core/operator_gradient.h:7:
../../../../src/main/cpp/caffe2/utils/proto_utils.h:58:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:3441:66: error: too few arguments to function call, expected 4, have 3
return detail::infer_type(self).as_strided(self, size, stride);
../../../../src/main/cpp/ATen/core/Type.h:208:3: note: 'as_strided' declared here
virtual Tensor as_strided(const Tensor & self, IntList size, IntList stride, c10::optional<int64_t> storage_offset) const = 0;
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:3444:67: error: too few arguments to function call, expected 4, have 3
return detail::infer_type(self).as_strided_(self, size, stride);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../../../src/main/cpp/ATen/core/Type.h:209:3: note: 'as_strided_' declared here
virtual Tensor & as_strided_(Tensor & self, IntList size, IntList stride, c10::optional<int64_t> storage_offset) const = 0;
^
In file included from ../../../../src/main/cpp/native-lib.cpp:16:
In file included from ../../../../src/main/cpp/ATen/ATen.h:11:
../../../../src/main/cpp/ATen/Functions.h:5243:37: error: no member named 'potrs' in 'at::TypeExtendedInterface'
return detail::infer_type(self).potrs(self, input2, upper);
~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning and 3 errors generated.
ninja: build stopped: subcommand failed.
I got the following error while building the code