Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
43a37f49
Mace
项目概览
Xiaomi
/
Mace
通知
107
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
43a37f49
编写于
7月 10, 2018
作者:
L
Liangliang He
提交者:
GitHub
7月 10, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #53 from yejw5/update_travis_ci
update travis ci process, add travis badge, update OpenCL-Header commit
上级
56166a31
5e378ec5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
56 addition
and
7 deletion
+56
-7
.travis.yml
.travis.yml
+40
-2
README.md
README.md
+1
-0
WORKSPACE
WORKSPACE
+4
-4
mace/tools/git/gen_version_source.sh
mace/tools/git/gen_version_source.sh
+1
-1
tools/build-standalone-lib.sh
tools/build-standalone-lib.sh
+10
-0
未找到文件。
.travis.yml
浏览文件 @
43a37f49
language
:
cpp
language
:
cpp
os
:
linux
dist
:
xenial
sudo
:
required
sudo
:
required
before_install
:
before_install
:
-
sudo pip install pycodestyle
-
sudo pip install pycodestyle
-
export BAZEL_VERSION=0.13.1
-
wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
-
chmod +x bazel-*.sh
-
sudo ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
-
rm -f bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
-
pushd /opt/
-
sudo wget -q https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
-
sudo unzip -q android-ndk-r15c-linux-x86_64.zip
-
sudo rm -f android-ndk-r15c-linux-x86_64.zip
-
export ANDROID_NDK_VERSION=r15c
-
export ANDROID_NDK=/opt/android-ndk-${ANDROID_NDK_VERSION}
-
export ANDROID_NDK_HOME=${ANDROID_NDK}
-
export PATH=${PATH}:${ANDROID_NDK_HOME}
-
popd
-
sudo apt-get update
-
sudo apt-get install -y --no-install-recommends android-tools-adb
-
sudo pip install setuptools
-
sudo pip install -I tensorflow==1.8.0 "numpy>=1.14.0" scipy jinja2 pyyaml sh==1.12.14 pycodestyle==2.4.0 filelock
script
:
script
:
-
curl -o cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py && python cpplint.py --linelength=80 --counting=detailed $(find mace -name "*.h" -or -name "*.cc") && rm -f cpplint.py
-
>
-
pycodestyle $(find -name "*.py")
echo "MACE_TEST 0: Check cpp code style";
curl -o cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py && python cpplint.py --linelength=80 --counting=detailed $(find mace -name "*.h" -or -name "*.cc") && rm -f cpplint.py || exit 1;
echo "MACE_TEST 1: Check python code style";
pycodestyle $(find -name "*.py") || exit 1;
echo "MACE_TEST 2: Platform compatible test";
mkdir -p mace/codegen/version && bash mace/tools/git/gen_version_source.sh mace/codegen/version/version.cc || exit 1;
mkdir -p mace/codegen/tuning && python mace/python/tools/binary_codegen.py --output_path=mace/codegen/tuning/tuning_params.cc || exit 1;
bazel build mace/core:core || exit 1;
echo "MACE_TEST 3: Ops test";
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a --enable_neon=false || exit 1;
echo "MACE_TEST 4: Api test";
python tools/bazel_adb_run.py --target="//mace/test:mace_api_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/test:mace_api_mt_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
echo "MACE_TEST 5: Ops benchmark";
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
echo "MACE_TEST 6: Extra test";
python tools/bazel_adb_run.py --target="//mace/kernels:kernels_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/utils:tuner_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
README.md
浏览文件 @
43a37f49
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
[

](LICENSE)
[

](LICENSE)
[

](https://gitlab.com/llhe/mace/pipelines)
[

](https://gitlab.com/llhe/mace/pipelines)
[

](https://readthedocs.org/projects/mace/badge/?version=latest)
[

](https://readthedocs.org/projects/mace/badge/?version=latest)
[

](https://travis-ci.org/travis-ci/travis-web)
[
Documentation
](
https://mace.readthedocs.io
)
|
[
Documentation
](
https://mace.readthedocs.io
)
|
[
FAQ
](
https://mace.readthedocs.io/en/latest/faq.html
)
|
[
FAQ
](
https://mace.readthedocs.io/en/latest/faq.html
)
|
...
...
WORKSPACE
浏览文件 @
43a37f49
...
@@ -27,11 +27,11 @@ new_http_archive(
...
@@ -27,11 +27,11 @@ new_http_archive(
new_http_archive
(
new_http_archive
(
name
=
"opencl_headers"
,
name
=
"opencl_headers"
,
build_file
=
"third_party/opencl-headers/opencl-headers.BUILD"
,
build_file
=
"third_party/opencl-headers/opencl-headers.BUILD"
,
sha256
=
"
5dc7087680853b5c825360fc04ca26534f4b9f22ac114c4d3a306bfbec3cd0f2
"
,
sha256
=
"
b2b813dd88a7c39eb396afc153070f8f262504a7f956505b2049e223cfc2229b
"
,
strip_prefix
=
"OpenCL-Headers-
master
"
,
strip_prefix
=
"OpenCL-Headers-
f039db6764d52388658ef15c30b2237bbda49803
"
,
urls
=
[
urls
=
[
"https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-Headers/
OpenCL-Headers-master
.zip"
,
"https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-Headers/
f039db6764d52388658ef15c30b2237bbda49803
.zip"
,
"https://github.com/KhronosGroup/OpenCL-Headers/archive/
master
.zip"
,
"https://github.com/KhronosGroup/OpenCL-Headers/archive/
f039db6764d52388658ef15c30b2237bbda49803
.zip"
,
],
],
)
)
...
...
mace/tools/git/gen_version_source.sh
浏览文件 @
43a37f49
...
@@ -45,7 +45,7 @@ cat <<EOF > ${OUTPUT_FILENAME}
...
@@ -45,7 +45,7 @@ cat <<EOF > ${OUTPUT_FILENAME}
// This is a generated file. DO NOT EDIT!
// This is a generated file. DO NOT EDIT!
namespace mace {
namespace mace {
__attribute__((visibility
("default")))
__attribute__((visibility("default")))
const char *MaceVersion() { return "MACEVER-
${
GIT_VERSION
}
" + 8; }
const char *MaceVersion() { return "MACEVER-
${
GIT_VERSION
}
" + 8; }
} // namespace mace
} // namespace mace
EOF
EOF
tools/build-standalone-lib.sh
浏览文件 @
43a37f49
...
@@ -8,6 +8,16 @@ INCLUDE_DIR=builds/include/mace/public
...
@@ -8,6 +8,16 @@ INCLUDE_DIR=builds/include/mace/public
mkdir
-p
$LIB_DIR
mkdir
-p
$LIB_DIR
mkdir
-p
$INCLUDE_DIR
mkdir
-p
$INCLUDE_DIR
# generate version code
rm
-rf
mace/codegen/version
mkdir
-p
mace/codegen/version
bash mace/tools/git/gen_version_source.sh mace/codegen/version/version.cc
# generate tuning code
rm
-rf
mace/codegen/tuning
mkdir
-p
mace/codegen/tuning
python mace/python/tools/binary_codegen.py
--output_path
=
mace/codegen/tuning/tuning_params.cc
# copy include headers
# copy include headers
cp
mace/public/
*
.h
$INCLUDE_DIR
/
cp
mace/public/
*
.h
$INCLUDE_DIR
/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录