I'm trying to build google android example using my own graph. I used the quantization method explaiened here. I've added "//tensorflow/contrib/quantization:cc_ops" and "//tensorflow/contrib/quantization/kernels:quantized_ops" to the build file. When I run bazel build //tensorflow/examples/android:tensorflow_demo I get the following errorERROR: /home/dani/tensorflow/tensorflow/core/BUILD:1065:1: C++ compilation of rule '//tensorflow/core:gpu_runtime' failed: arm-linux-androideabi-gcc failed: error executing command external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables ... (remaining 95 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc: In member function 'virtual void* tensorflow::GPUNanResetAllocator::AllocateRaw(std::size_t, std::size_t)': tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:169:53: error: 'nanf' is not a member of 'std' std::vector<float> nans(req_size / sizeof(float), std::nanf("")); ^ tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:169:53: note: suggested alternative: In file included from external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cmath:44:0, from external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/complex:44, from ./tensorflow/core/framework/numeric_types.h:19, from ./tensorflow/core/framework/allocator.h:24, from ./tensorflow/core/common_runtime/visitable_allocator.h:20, from ./tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h:23, from tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:16: external/androidndk/ndk/platforms/android-21/arch-arm/usr/include/math.h:354:7: note: 'nanf' float nanf(const char *) __NDK_FPABI_MATH__ __pure2; ^ tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc: In member function 'virtual void tensorflow::GPUNanResetAllocator::DeallocateRaw(void*)': tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:182:53: error: 'nanf' is not a member of 'std' std::vector<float> nans(req_size / sizeof(float), std::nanf("")); ^ tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:182:53: note: suggested alternative: In file included from external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cmath:44:0, from external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/complex:44, from ./tensorflow/core/framework/numeric_types.h:19, from ./tensorflow/core/framework/allocator.h:24, from ./tensorflow/core/common_runtime/visitable_allocator.h:20, from ./tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h:23, from tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc:16: external/androidndk/ndk/platforms/android-21/arch-arm/usr/include/math.h:354:7: note: 'nanf' float nanf(const char *) __NDK_FPABI_MATH__ __pure2; ^ Target //tensorflow/examples/android:tensorflow_demo failed to build I've tried using both android-ndk-r10e and android-ndk-r11. Thanks, Dan
lundi 23 mai 2016
error: 'nanf' is not a member of 'std' when building tensorflow android with quantized graph
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire