From 91ecef3d704cb56d64eb9a0e9b24d8ddf1583ab8 Mon Sep 17 00:00:00 2001 From: Tatsuya Nishiyama Date: Wed, 13 Jun 2018 02:30:31 +0900 Subject: [PATCH] Fix the building error in android_deploy (#1262) * Fix a link in android_deploy/README.md and a error while building android_deploy. * revert and change APP_STL in Application.mk --- apps/android_deploy/README.md | 2 +- apps/android_deploy/app/src/main/jni/Application.mk | 2 +- src/runtime/thread_pool.cc | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/android_deploy/README.md b/apps/android_deploy/README.md index 94cc9984b0c2..801ca8bdf95c 100644 --- a/apps/android_deploy/README.md +++ b/apps/android_deploy/README.md @@ -99,7 +99,7 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain- ### Place compiled model on Android application assets folder -Follow instruction to get compiled version model for android target [here.](https://tvm.ai/deploy/android.html) +Follow instruction to get compiled version model for android target [here.](http://docs.tvm.ai/deploy/android.html) Copied these compiled model deploy_lib.so, deploy_graph.json and deploy_param.params to apps/android_deploy/app/src/main/assets/ and modify TVM flavor changes on [java](https://github.com/dmlc/tvm/blob/master/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java#L81) diff --git a/apps/android_deploy/app/src/main/jni/Application.mk b/apps/android_deploy/app/src/main/jni/Application.mk index 01cad9b783a7..8e81a8d6a81c 100644 --- a/apps/android_deploy/app/src/main/jni/Application.mk +++ b/apps/android_deploy/app/src/main/jni/Application.mk @@ -8,7 +8,7 @@ endif include $(config) -APP_STL := gnustl_static +APP_STL := c++_static APP_CPPFLAGS += -DDMLC_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++11 -Oz -frtti ifeq ($(USE_OPENCL), 1) diff --git a/src/runtime/thread_pool.cc b/src/runtime/thread_pool.cc index b7ea6f5b81d3..5e5c08509a44 100644 --- a/src/runtime/thread_pool.cc +++ b/src/runtime/thread_pool.cc @@ -69,6 +69,8 @@ class ParallelLauncher { tvm::runtime::threading::Yield(); } if (!has_error_.load()) return 0; + // the following is intended to use string due to + // security issue raised in SGX backend std::string err(""); for (size_t i = 0; i < par_errors_.size(); ++i) { if (par_errors_[i].length() != 0) {