Merge pull request #26336 from xinpingwang:master

PiperOrigin-RevId: 261392945
This commit is contained in:
TensorFlower Gardener 2019-08-02 15:12:20 -07:00
commit aa19d7f8e4
3 changed files with 58 additions and 0 deletions

View File

@ -161,6 +161,9 @@ endif
ifeq ($(TARGET),rpi)
BUILD_WITH_NNAPI=false
endif
ifeq ($(TARGET),generic-aarch64)
BUILD_WITH_NNAPI=false
endif
ifeq ($(BUILD_WITH_NNAPI),true)
CORE_CC_ALL_SRCS += tensorflow/lite/delegates/nnapi/nnapi_delegate.cc
CORE_CC_ALL_SRCS += tensorflow/lite/nnapi/nnapi_implementation.cc

View File

@ -0,0 +1,22 @@
#!/bin/bash -x
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../../../.."
CC_PREFIX=aarch64-linux-gnu- make -j 3 -f tensorflow/lite/tools/make/Makefile TARGET=generic-aarch64 TARGET_ARCH=armv8-a

View File

@ -0,0 +1,33 @@
# Settings for generic aarch64 boards such as Odroid C2 or Pine64.
ifeq ($(TARGET),generic-aarch64)
# The aarch64 architecture covers all 64-bit ARM chips. This arch mandates
# NEON, so FPU flags are not needed below.
TARGET_ARCH := armv8-a
TARGET_TOOLCHAIN_PREFIX := aarch64-linux-gnu-
CXXFLAGS += \
-march=armv8-a \
-funsafe-math-optimizations \
-ftree-vectorize \
-fPIC
CCFLAGS += \
-march=armv8-a \
-funsafe-math-optimizations \
-ftree-vectorize \
-fPIC
LDFLAGS := \
-Wl,--no-export-dynamic \
-Wl,--exclude-libs,ALL \
-Wl,--gc-sections \
-Wl,--as-needed
LIBS := \
-lstdc++ \
-lpthread \
-lm \
-ldl
endif