提交 ac744187 编写于 作者: D dolphin8

Docker env & modify cmake

上级 80a3f082
......@@ -6,8 +6,8 @@ option(USE_OPENMP "openmp support" OFF)
option(USE_EXCEPTION "use std exception" ON)
option(LOG_PROFILE "log profile" ON)
# select the platform to build
option(CPU "cpu" ON)
option(MALI_GPU "mali gpu" ON)
option(CPU "armv7 with neon" ON)
option(MALI_GPU "mali gpu" OFF)
option(FPGA "fpga" OFF)
if (CPU)
......@@ -22,25 +22,22 @@ if(FPGA)
add_definitions(-DPADDLE_MOBILE_FPGA)
endif()
set(CMAKE_CXX_FLAGS "-std=c++14 -O3 -s ${CMAKE_CXX_FLAGS}")
if (DEBUGING)
message(STATUS "debug")
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_BUILD_TYPE Release)
endif ()
if(DEBUGING)
message(STATUS "debuging")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
add_definitions(-DPADDLE_MOBILE_DEBUG)
if(ANDROID)
if (ANDROID_NDK_TOOLCHAIN_INCLUDED)
add_definitions(-DARMV7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -llog")
endif()
else()
message(STATUS "releasing")
endif ()
else ()
set(CMAKE_BUILD_TYPE Release)
add_definitions(-fvisibility=hidden -fvisibility-inlines-hidden)
endif()
endif ()
if (USE_EXCEPTION)
message(STATUS "use exception")
......@@ -54,110 +51,37 @@ if (LOG_PROFILE)
add_definitions(-DPADDLE_MOBILE_PROFILE)
endif()
if(IS_MAC)
add_definitions(-DX86)
elseif(IS_IOS)
add_definitions(-DIOS)
elseif(V7)
add_definitions(-DARMV7)
elseif(V8)
add_definitions(-DARMV8)
else ()
add_definitions(-DX86)
if(USE_OPENMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
add_definitions(-DPADDLE_MOBILE_USE_OPENMP)
endif()
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c)
file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
if (NOT ANDROID)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/jni/*.cpp)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/jni/*.h)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/operators/math/math_func_neon.h)
if (NOT ANDROID_NDK_TOOLCHAIN_INCLUDED)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/jni/*.cpp)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/jni/*.h)
list(REMOVE_ITEM PADDLE_MOBILE_CC ${CMAKE_CURRENT_SOURCE_DIR}/src/operators/math/math_func_neon.h)
endif ()
include_directories(src/)
if(USE_OPENMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
add_definitions(-DPADDLE_MOBILE_USE_OPENMP)
endif()
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
if (googlenet)
add_definitions(-DCONCAT_OP)
add_definitions(-DCONV_OP)
add_definitions(-DLRN_OP)
add_definitions(-DMUL_OP)
add_definitions(-DELEMENTWISEADD_OP)
add_definitions(-DFUSION_FC_OP)
add_definitions(-DPOOL_OP)
add_definitions(-DRELU_OP)
add_definitions(-DFUSION_CONVADD_OP)
add_definitions(-DFUSION_CONVADD_RELU_OP)
elseif (mobilenet)
add_definitions(-DCONV_OP)
add_definitions(-DELEMENTWISEADD_OP)
add_definitions(-DRELU_OP)
add_definitions(-DSOFTMAX_OP)
add_definitions(-DSOFTMAX_OP)
add_definitions(-DDEPTHWISECONV_OP)
add_definitions(-DBATCHNORM_OP)
add_definitions(-DPOOL_OP)
add_definitions(-DRESHAPE_OP)
elseif (yolo)
add_definitions(-DBATCHNORM_OP)
add_definitions(-DCONV_OP)
add_definitions(-DRELU_OP)
add_definitions(-DELEMENTWISEADD_OP)
elseif (squeezenet)
add_definitions(-DCONCAT_OP)
add_definitions(-DCONV_OP)
add_definitions(-DRELU_OP)
add_definitions(-DELEMENTWISEADD_OP)
add_definitions(-DPOOL_OP)
add_definitions(-DRESHAPE_OP)
add_definitions(-DSOFTMAX_OP)
elseif(resnet)
add_definitions(-DCONV_OP)
add_definitions(-DBATCHNORM_OP)
add_definitions(-DELEMENTWISEADD_OP)
add_definitions(-DSOFTMAX_OP)
add_definitions(-DMUL_OP)
add_definitions(-DPOOL_OP)
add_definitions(-DRELU_OP)
else ()
add_definitions(-DBATCHNORM_OP)
add_definitions(-DBOXCODER_OP)
add_definitions(-DCONCAT_OP)
add_definitions(-DCONV_OP)
add_definitions(-DDEPTHWISECONV_OP)
add_definitions(-DELEMENTWISEADD_OP)
add_definitions(-DFUSION_CONVADD_OP)
add_definitions(-DCONVADDRELU_OP)
add_definitions(-DFUSION_FC_OP)
add_definitions(-DLRN_OP)
add_definitions(-DMUL_OP)
add_definitions(-DMULTICLASSNMS_OP)
add_definitions(-DPOOL_OP)
add_definitions(-DPRIORBOX_OP)
add_definitions(-DRELU_OP)
add_definitions(-DRESHAPE_OP)
add_definitions(-DSIGMOID_OP)
add_definitions(-DSOFTMAX_OP)
add_definitions(-DTRANSPOSE_OP)
add_definitions(-DFUSION_CONVADD_RELU_OP)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/tools/op.cmake")
if (IS_IOS)
add_library(paddle-mobile STATIC ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
elseif(ANDROID)
# if (IS_IOS)
# add_library(paddle-mobile STATIC ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
if (ANDROID_NDK_TOOLCHAIN_INCLUDED)
list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS)
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
else()
else ()
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
endif ()
......
FROM ubuntu:18.04
FROM ubuntu:16.04
RUN echo '\
deb <mirror> bionic main restricted universe multiverse\n\
deb <mirror> bionic-updates main restricted universe multiverse\n\
deb <mirror> bionic-backports main restricted universe multiverse\n\
deb <mirror> bionic-security main restricted universe multiverse\n'\
deb <mirror> <version> main restricted universe multiverse\n\
deb <mirror> <version>-updates main restricted universe multiverse\n\
deb <mirror> <version>-backports main restricted universe multiverse\n\
deb <mirror> <version>-security main restricted universe multiverse\n'\
> /etc/apt/sources.list
RUN sed -ie 's|<mirror>|http://mirrors.tuna.tsinghua.edu.cn/ubuntu/|' /etc/apt/sources.list
RUN sed -ie 's|<version>|xenial|' /etc/apt/sources.list
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y --no-install-recommends \
curl \
unzip \
git \
make \
cmake \
cmake-curses-gui \
python \
python-pip \
python-setuptools \
clang-format-5.0 \
graphviz
graphviz \
g++-arm-linux-gnueabi \
gcc-arm-linux-gnueabi
RUN apt-get autoremove -y && apt-get clean
RUN pip install wheel pre-commit
RUN pre-commit autoupdate
RUN ln -s clang-format-5.0 /usr/bin/clang-format
RUN cd /tmp && curl -O http://mirrors.neusoft.edu.cn/android/repository/android-ndk-r17b-linux-x86_64.zip
RUN cd /opt && unzip /tmp/android-ndk-r17b-linux-x86_64.zip
\ No newline at end of file
#RUN cd /tmp && curl -O http://mirrors.neusoft.edu.cn/android/repository/android-ndk-r17b-linux-x86_64.zip
#RUN cd /opt && unzip /tmp/android-ndk-r17b-linux-x86_64.zip
......@@ -18,6 +18,7 @@ limitations under the License. */
#ifdef PADDLE_MOBILE_DEBUG
#include <iostream>
#include <sstream>
#include <cstring>
#include <string>
#endif
#ifdef ANDROID
......@@ -120,7 +121,7 @@ struct ToLog {
} else \
paddle_mobile::ToLog( \
level, \
(std::stringstream() \
static_cast<std::stringstream&>(std::stringstream() \
<< "[file: " \
<< (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__) \
<< "] [line: " << __LINE__ << "] ") \
......@@ -131,7 +132,7 @@ struct ToLog {
} else \
paddle_mobile::ToLog( \
paddle_mobile::kLOG_DEBUG, \
(std::stringstream() \
static_cast<std::stringstream&>(std::stringstream() \
<< "[file: " \
<< (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__) \
<< "] [line: " << __LINE__ << "] ") \
......
......@@ -12,11 +12,12 @@ 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. */
#pragma once;
#pragma once
#include <map>
#include <string>
#include <vector>
#include <functional>
#include "framework/attribute.h"
#include "framework/scope.h"
......
......@@ -12,10 +12,11 @@ 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. */
#pragma once;
#pragma once
#include <string>
#include <unordered_map>
#include <vector>
namespace paddle_mobile {
enum class Precision : int { FP32 = 0 };
......
#pragma once
#include <thread>
#include <condition_variable>
#include <mutex>
#include <iostream>
// #include <function>
// #include <queue>
template <typename T>
class workThread {
public:
void init(std::vector<T> & ops) {
this->ops = ops;
t = std::thread([this]{
threadLoop();
});
}
void threadLoop() {
//std::unique_lock<std::mutex> lk(m);
for (;;) {
while(true) {
std::lock_guard<std::mutex> lg(m);
if (job != -1) break;
};
// std::cout << "loop!" << "\n";
// cv.wait(lk, [this]{
// // std::cout << "wake up!!! you have work to do: " << job << "\n";
// return job != -1;
// });
if (job == -2) {
break;
}
// TODO run job
ops[job]->Run();
job = -1;
cv.notify_one();
}
}
void run(int i) {
std::lock_guard<std::mutex> lk(m);
job = i;
cv.notify_one();
}
void join() {
std::unique_lock<std::mutex> lk(m);
cv.wait(lk, [this]{
return job == -1;
});
}
void quit() {
{
std::cout << "try get lock!!!\n";
std::lock_guard<std::mutex> lk(m);
std::cout << "set job = -2\n";
job = -2;
cv.notify_one();
}
t.join();
std::cout << "job quit\n";
}
private:
std::vector<T> ops;
// std::queue<std::function<void()>> q;
int job = -1;
// std::atomic<int> job;
std::condition_variable cv;
std::mutex m;
std::thread t;
// bool idle = false;
};
#pragma once
#include <thread>
#include <condition_variable>
#include <mutex>
#include <iostream>
// #include <function>
// #include <queue>
template <typename T>
class workThread {
public:
void init() {
// this->ops = ops;
t = std::thread([this]{
threadLoop();
});
}
void threadLoop() {
//std::unique_lock<std::mutex> lk(m);
for (;;) {
while(true) {
std::lock_guard<std::mutex> lg(m);
if (job != -1) break;
};
// std::cout << "loop!" << "\n";
// cv.wait(lk, [this]{
// // std::cout << "wake up!!! you have work to do: " << job << "\n";
// return job != -1;
// });
if (job == -2) {
break;
}
// TODO run job
this->f();
job = -1;
cv.notify_one();
}
}
template <typename Func>
void run(Func && f) {
std::lock_guard<std::mutex> lk(m);
this->f = std::forward(f);
job = 1;
cv.notify_one();
}
void join() {
std::unique_lock<std::mutex> lk(m);
cv.wait(lk, [this]{
return job == -1;
});
}
void quit() {
{
std::cout << "try get lock!!!\n";
std::lock_guard<std::mutex> lk(m);
std::cout << "set job = -2\n";
job = -2;
cv.notify_one();
}
t.join();
std::cout << "job quit\n";
}
private:
std::function<void()> f;
int job = -1;
// std::atomic<int> job;
std::condition_variable cv;
std::mutex m;
std::thread t;
// bool idle = false;
};
......@@ -17,6 +17,7 @@ limitations under the License. */
#include <string>
#include <unordered_map>
#include <vector>
#include <typeinfo>
#include "common/enforce.h"
#include "common/log.h"
......
......@@ -16,6 +16,7 @@ limitations under the License. */
#include <initializer_list>
#include <vector>
#include <typeinfo>
#include "common/enforce.h"
#include "common/variant.h"
#include "dim.h"
......
......@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "lod_tensor.h"
#include <algorithm>
namespace paddle_mobile {
namespace framework {
......
/* Copyright (c) 2018 PaddlePaddle 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. */
// #include "profile.h"
// Profile & getProfile() {
// static Profile p;
// return p;
// }
\ No newline at end of file
/* Copyright (c) 2018 PaddlePaddle 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. */
#pragma once
// #include "framework/program/program.h"
// class Profile {
// public:
// template <typename T, typename P>
// void init(const framework::Program<T, P> &);
// // getDotDesc();
// // getTimelineInfo();
// private:
// struct OpInfo {
// int index;
// std::shared_ptr<framework::OpDesc> op;
// };
// std::unordered_map<void*, OpInfo> opInfo;
// };
// Profile & getProfile();
......@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "block_desc.h"
#include <algorithm>
namespace paddle_mobile {
namespace framework {
......
......@@ -14,6 +14,7 @@ limitations under the License. */
#include "framework/program/program-optimize/node.h"
#include "framework/operator.h"
#include <algorithm>
namespace paddle_mobile {
......
......@@ -14,6 +14,7 @@ limitations under the License. */
#include "framework/program/program-optimize/program_optimize.h"
#include "framework/program/program-optimize/fusion_op_register.h"
#include <algorithm>
namespace paddle_mobile {
......
......@@ -17,6 +17,7 @@ limitations under the License. */
#include <set>
#include <string>
#include <vector>
#include <algorithm>
namespace paddle_mobile {
namespace framework {
......
......@@ -24,8 +24,8 @@ limitations under the License. */
#include "framework/program/var_desc.h"
#include "framework/scope.h"
#include "framework/tensor.h"
#ifdef PADDLE_EXECUTOR_MULTITHREAD
#include <algorithm>
#ifdef PADDLE_EXECUTOR_MULTITHREAD
#include <queue>
#include <utility>
#include "common/threadpool.h"
......
......@@ -12,8 +12,6 @@ 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. */
#pragma once
#include "memory/t_malloc.h"
#include <cstdlib>
#include <cstring>
......
......@@ -14,9 +14,9 @@ limitations under the License. */
#ifdef BATCHNORM_OP
#pragma once
#include "operators/kernel/batchnorm_kernel.h"
#include <cmath>
namespace paddle_mobile {
namespace operators {
......
......@@ -15,6 +15,7 @@ limitations under the License. */
#ifdef BOXCODER_OP
#include "operators/kernel/box_coder_kernel.h"
#include <cmath>
namespace paddle_mobile {
namespace operators {
......
......@@ -14,10 +14,8 @@ limitations under the License. */
#ifdef MULTICLASSNMS_OP
#pragma once
#include "operators/kernel/multiclass_nms_kernel.h"
#include <algorithm>
namespace paddle_mobile {
namespace operators {
......
......@@ -14,8 +14,6 @@ limitations under the License. */
#ifdef PRIORBOX_OP
#pragma once
#include "operators/kernel/prior_box_kernel.h"
namespace paddle_mobile {
......
......@@ -14,8 +14,6 @@ limitations under the License. */
#ifdef RELU_OP
#pragma once
#include "operators/kernel/relu_kernel.h"
#include <operators/math/transform.h>
......
......@@ -14,8 +14,6 @@ limitations under the License. */
#ifdef RESHAPE_OP
#pragma once
#include "operators/kernel/reshape_kernel.h"
namespace paddle_mobile {
......
......@@ -18,7 +18,7 @@ limitations under the License. */
#if __ARM_NEON
#include "../../math/math_func_neon.h"
#endif
#include <cmath>
namespace paddle_mobile {
namespace operators {
......
......@@ -14,10 +14,11 @@ limitations under the License. */
#ifdef LRN_OP
#pragma once
#include "framework/operator.h"
#include "operators/op_param.h"
#include <cmath>
#ifdef __ARM_NEON
#include "arm_neon.h"
#include "operators/math/math_func_neon.h"
......
......@@ -14,7 +14,6 @@ limitations under the License. */
#ifdef BATCHNORM_OP
#pragma once
#include "operators/kernel/batchnorm_kernel.h"
......
......@@ -17,7 +17,8 @@ limitations under the License. */
#pragma once
#include <vector>
#include <cmath>
#include <algorithm>
#include "framework/operator.h"
#include "operators/math/transform.h"
#include "operators/op_param.h"
......
......@@ -19,7 +19,7 @@ limitations under the License. */
#if __ARM_NEON
#include <arm_neon.h>
#endif // __ARM_NEON
#include <climits>
namespace paddle_mobile {
namespace operators {
namespace math {
......
set(ARCH "armv7-a")
set(FLOAT_ABI "softfp" CACHE STRING "-mfloat-api chosen")
set_property(CACHE FLOAT_ABI PROPERTY STRINGS "softfp" "soft" "hard")
set(FPU "neon")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${ARCH} -mfloat-abi=${FLOAT_ABI} -mfpu=${FPU}")
set(NET "googlenet" CACHE STRING "select net type")
set_property(CACHE NET PROPERTY STRINGS "defult" "googlenet" "mobilenet" "yolo" "squeezenet")
if (NET EQUAL "googlenet")
set(CONCAT_OP ON)
set(CONV_OP ON)
set(LRN_OP ON)
set(MUL_OP ON)
set(ELEMENTWISEADD_OP ON)
set(FUSION_FC_OP ON)
set(POOL_OP ON)
set(RELU_OP ON)
set(FUSION_CONVADD_OP ON)
set(FUSION_CONVADD_RELU_OP ON)
elseif (NET EQUAL "mobilenet")
set(CONV_OP ON)
set(ELEMENTWISEADD_OP ON)
set(RELU_OP ON)
set(SOFTMAX_OP ON)
set(SOFTMAX_OP ON)
set(DEPTHWISECONV_OP ON)
set(BATCHNORM_OP ON)
set(POOL_OP ON)
set(RESHAPE_OP ON)
elseif (NET EQUAL "yolo")
set(BATCHNORM_OP ON)
set(CONV_OP ON)
set(RELU_OP ON)
set(ELEMENTWISEADD_OP ON)
elseif (NET EQUAL "squeezenet")
set(CONCAT_OP ON)
set(CONV_OP ON)
set(RELU_OP ON)
set(ELEMENTWISEADD_OP ON)
set(POOL_OP ON)
set(RESHAPE_OP ON)
set(SOFTMAX_OP ON)
elseif (NET EQUAL "resnet")
set(CONV_OP ON)
set(BATCHNORM_OP ON)
set(ELEMENTWISEADD_OP ON)
set(SOFTMAX_OP ON)
set(MUL_OP ON)
set(POOL_OP ON)
set(RELU_OP ON)
else ()
set(BATCHNORM_OP ON)
set(BOXCODER_OP ON)
set(CONCAT_OP ON)
set(CONV_OP ON)
set(DEPTHWISECONV_OP ON)
set(ELEMENTWISEADD_OP ON)
set(FUSION_CONVADD_OP ON)
set(CONVADDRELU_OP ON)
set(FUSION_FC_OP ON)
set(LRN_OP ON)
set(MUL_OP ON)
set(MULTICLASSNMS_OP ON)
set(POOL_OP ON)
set(PRIORBOX_OP ON)
set(RELU_OP ON)
set(RESHAPE_OP ON)
set(SIGMOID_OP ON)
set(SOFTMAX_OP ON)
set(TRANSPOSE_OP ON)
set(FUSION_CONVADD_RELU_OP ON)
# option(BATCHNORM_OP "" ON)
# option(BOXCODER_OP "" ON)
# option(CONCAT_OP "" ON)
# option(CONV_OP "" ON)
# option(DEPTHWISECONV_OP "" ON)
# option(ELEMENTWISEADD_OP "" ON)
# option(FUSION_CONVADD_OP "" ON)
# option(CONVADDRELU_OP "" ON)
# option(FUSION_FC_OP "" ON)
# option(LRN_OP "" ON)
# option(MUL_OP "" ON)
# option(MULTICLASSNMS_OP "" ON)
# option(POOL_OP "" ON)
# option(PRIORBOX_OP "" ON)
# option(RELU_OP "" ON)
# option(RESHAPE_OP "" ON)
# option(SIGMOID_OP "" ON)
# option(SOFTMAX_OP "" ON)
# option(TRANSPOSE_OP "" ON)
# option(FUSION_CONVADD_RELU_OP "" ON)
endif ()
if (BATCHNORM_OP)
add_definitions(-DBATCHNORM_OP)
endif()
if (BOXCODER_OP)
add_definitions(-DBOXCODER_OP)
endif()
if (CONCAT_OP)
add_definitions(-DCONCAT_OP)
endif()
if (CONV_OP)
add_definitions(-DCONV_OP)
endif()
if (DEPTHWISECONV_OP)
add_definitions(-DDEPTHWISECONV_OP)
endif()
if (ELEMENTWISEADD_OP)
add_definitions(-DELEMENTWISEADD_OP)
endif()
if (FUSION_CONVADD_OP)
add_definitions(-DFUSION_CONVADD_OP)
endif()
if (CONVADDRELU_OP)
add_definitions(-DCONVADDRELU_OP)
endif()
if (FUSION_FC_OP)
add_definitions(-DFUSION_FC_OP)
endif()
if (LRN_OP)
add_definitions(-DLRN_OP)
endif()
if (MUL_OP)
add_definitions(-DMUL_OP)
endif()
if (MULTICLASSNMS_OP)
add_definitions(-DMULTICLASSNMS_OP)
endif()
if (POOL_OP)
add_definitions(-DPOOL_OP)
endif()
if (PRIORBOX_OP)
add_definitions(-DPRIORBOX_OP)
endif()
if (RELU_OP)
add_definitions(-DRELU_OP)
endif()
if (RESHAPE_OP)
add_definitions(-DRESHAPE_OP)
endif()
if (SIGMOID_OP)
add_definitions(-DSIGMOID_OP)
endif()
if (SOFTMAX_OP)
add_definitions(-DSOFTMAX_OP)
endif()
if (TRANSPOSE_OP)
add_definitions(-DTRANSPOSE_OP)
endif()
if (FUSION_CONVADD_RELU_OP)
add_definitions(-DFUSION_CONVADD_RELU_OP)
endif()
\ No newline at end of file
set(ANDROID_ARM_NEON ON)
include("${CMAKE_CURRENT_LIST_DIR}/../android-cmake/android.toolchain.cmake")
\ No newline at end of file
# CMake toolchain file for building ARM software on Linux environment
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabi-g++)
set(CMAKE_STRIP /usr/bin/arm-linux-gnueabi-strip)
set(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabi)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
include("${CMAKE_CURRENT_LIST_DIR}/arm-platform.cmake")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册