Skip to content

Commit

Permalink
upgrade to TensorFlow r0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
miyosuda committed Sep 26, 2016
1 parent 49416c0 commit 8645e53
Show file tree
Hide file tree
Showing 7,502 changed files with 518,071 additions and 649,352 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,5 @@ and copy .so file into app/src/main/jniLibs/armeabi-v7a/ with
$ make install

(Unlike original Android demo in Tensorflow, you don't need to install bazel to build this demo.
And it seems that original Tensorflow Android demo fails to be built with bazel and latest ndk-r11b, and requires old ndk-r10e now, but this demo can be built with r11b.)

Tensorflow library files (.a files) and header files are extracted from original Tensorflow Android demo r0.8.
Tensorflow library files (.a files) and header files are extracted from original Tensorflow Android demo r0.10.
Binary file modified app/src/main/jniLibs/armeabi-v7a/libtensorflow_mnist.so
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:2.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Oct 21 11:34:03 PDT 2015
#Mon Sep 26 20:47:15 JST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
56 changes: 47 additions & 9 deletions jni-build/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@ LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

TENSORFLOW_CFLAGS := \
-fstack-protector-strong \
-fpic \
-ffunction-sections \
-funwind-tables \
-no-canonical-prefixes \
-fno-canonical-system-headers \
'-march=armv7-a' \
'-mfpu=vfpv3-d16' \
'-mfloat-abi=softfp' \
-DHAVE_PTHREAD \
-Wall \
-Wwrite-strings \
-Woverloaded-virtual \
-Wno-sign-compare \
'-Wno-error=unused-function' \
'-std=c++11' \
-fno-exceptions \
-DEIGEN_AVOID_STL_ARRAY \
'-mfpu=neon' \
'-std=c++11' \
'-DMIN_LOG_LEVEL=0' \
-DTF_LEAN_BINARY \
-O2 \
-Os \
-frtti \
-MD \

TENSORFLOW_CFLAGS := -frtti \
-fstack-protector-strong \
-fpic \
Expand All @@ -25,27 +53,37 @@ LOCAL_CFLAGS := $(TENSORFLOW_CFLAGS)

LOCAL_LDLIBS := \
-Wl,-whole-archive \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libandroid_tensorflow_kernels.lo \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libandroid_tensorflow_lib.lo \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libandroid_tensorflow_kernels.lo \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libandroid_tensorflow_lib_lite.lo \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libre2.a \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libprotos_all_cc.a \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libprotobuf.a \
$(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libprotobuf_lite.a \
-Wl,-no-whole-archive \
$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(TARGET_ARCH_ABI)/libgnustl_static.a \
$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(TARGET_ARCH_ABI)/libsupc++.a \
-llog -landroid -lm -ljnigraphics -pthread -no-canonical-prefixes '-march=armv7-a' -Wl,--fix-cortex-a8 -Wl,-S \



-landroid \
-ljnigraphics \
-llog \
-lm \
-z defs \
-s \
'-Wl,--icf=all' \
-Wl,--exclude-libs,ALL \
-lz \
-static-libgcc \
-no-canonical-prefixes \
'-march=armv7-a' \
-Wl,--fix-cortex-a8 \
-Wl,-S \

LOCAL_C_INCLUDES += $(LOCAL_PATH)/include \
$(LOCAL_PATH)/genfiles \
$(LOCAL_PATH)/include/third_party/eigen3 \
$(LOCAL_PATH)/include/external/protobuf \
$(LOCAL_PATH)/include/external/bazel_tools \
$(LOCAL_PATH)/include/external/eigen_archive \
$(LOCAL_PATH)/include/external/eigen_archive/eigen-eigen-4c94692de3e5 \
$(LOCAL_PATH)/include/google/protobuf/src
$(LOCAL_PATH)/include/external/protobuf/src \
$(LOCAL_PATH)/include/external/bazel_tools/tools/cpp/gcc3 \

NDK_MODULE_PATH := $(call my-dir)

Expand Down
Loading

0 comments on commit 8645e53

Please sign in to comment.