Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
孤小逸
Mace
提交
431fc665
Mace
项目概览
孤小逸
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
431fc665
编写于
7月 06, 2018
作者:
L
Liangliang He
提交者:
GitHub
7月 06, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #48 from allen0125/suitable_macos
Fix build for Mac
上级
3af0ce3e
a8a79172
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
14 deletion
+36
-14
.gitignore
.gitignore
+4
-0
mace/examples/android/build.sh
mace/examples/android/build.sh
+2
-2
tools/converter.py
tools/converter.py
+3
-1
tools/sh_commands.py
tools/sh_commands.py
+27
-11
未找到文件。
.gitignore
浏览文件 @
431fc665
...
@@ -13,4 +13,8 @@ build/
...
@@ -13,4 +13,8 @@ build/
docs/_build/
docs/_build/
*.a
*.a
.vscode/
builds/
mace/examples/android/macelibrary/src/main/cpp/mace/
\.project/
\.project/
mace/examples/android/build.sh
浏览文件 @
431fc665
...
@@ -5,8 +5,8 @@ set -e -u -o pipefail
...
@@ -5,8 +5,8 @@ set -e -u -o pipefail
pushd
../../../
pushd
../../../
python tools/converter.py build
--config
=
docs/getting_started/models/demo_app_models.yaml
python tools/converter.py build
--config
=
docs/getting_started/models/demo_app_models.yaml
cp
-r
build/mobilenet/include/ mace/examples/android/macelibrary/src/main/cpp/
cp
-r
build
s
/mobilenet/include/ mace/examples/android/macelibrary/src/main/cpp/
cp
-r
build/mobilenet/lib/ mace/examples/android/macelibrary/src/main/cpp/
cp
-r
build
s
/mobilenet/lib/ mace/examples/android/macelibrary/src/main/cpp/
popd
popd
...
...
tools/converter.py
浏览文件 @
431fc665
...
@@ -35,10 +35,12 @@ from common import mace_check
...
@@ -35,10 +35,12 @@ from common import mace_check
from
common
import
MaceLogger
from
common
import
MaceLogger
from
common
import
StringFormatter
from
common
import
StringFormatter
os
.
environ
[
'TF_CPP_MIN_LOG_LEVEL'
]
=
'2'
################################
################################
# common definitions
# common definitions
################################
################################
BUILD_OUTPUT_DIR
=
'build'
BUILD_OUTPUT_DIR
=
'build
s
'
BUILD_DOWNLOADS_DIR
=
BUILD_OUTPUT_DIR
+
'/downloads'
BUILD_DOWNLOADS_DIR
=
BUILD_OUTPUT_DIR
+
'/downloads'
PHONE_DATA_DIR
=
"/data/local/tmp/mace_run"
PHONE_DATA_DIR
=
"/data/local/tmp/mace_run"
MODEL_OUTPUT_DIR_NAME
=
'model'
MODEL_OUTPUT_DIR_NAME
=
'model'
...
...
tools/sh_commands.py
浏览文件 @
431fc665
...
@@ -25,6 +25,7 @@ import subprocess
...
@@ -25,6 +25,7 @@ import subprocess
import
sys
import
sys
import
time
import
time
import
urllib
import
urllib
import
platform
from
enum
import
Enum
from
enum
import
Enum
import
common
import
common
...
@@ -1056,10 +1057,15 @@ def merge_libs(target_soc,
...
@@ -1056,10 +1057,15 @@ def merge_libs(target_soc,
mri_stream
+=
"save
\n
"
mri_stream
+=
"save
\n
"
mri_stream
+=
"end
\n
"
mri_stream
+=
"end
\n
"
which_sys
=
platform
.
system
()
cmd
=
sh
.
Command
(
"%s/toolchains/"
%
os
.
environ
[
"ANDROID_NDK_HOME"
]
+
if
which_sys
==
"Linux"
:
"aarch64-linux-android-4.9/prebuilt/linux-x86_64/"
+
cmd
=
sh
.
Command
(
"%s/toolchains/"
%
os
.
environ
[
"ANDROID_NDK_HOME"
]
+
"bin/aarch64-linux-android-ar"
)
"aarch64-linux-android-4.9/prebuilt/linux-x86_64/"
+
"bin/aarch64-linux-android-ar"
)
elif
which_sys
==
"Darwin"
:
cmd
=
sh
.
Command
(
"%s/toolchains/"
%
os
.
environ
[
"ANDROID_NDK_HOME"
]
+
"aarch64-linux-android-4.9/prebuilt/darwin-x86_64/"
+
"bin/aarch64-linux-android-ar"
)
cmd
(
"-M"
,
_in
=
mri_stream
)
cmd
(
"-M"
,
_in
=
mri_stream
)
...
@@ -1076,13 +1082,23 @@ def packaging_lib(libmace_output_dir, project_name):
...
@@ -1076,13 +1082,23 @@ def packaging_lib(libmace_output_dir, project_name):
print
(
"Start packaging '%s' libs into %s"
%
(
project_name
,
print
(
"Start packaging '%s' libs into %s"
%
(
project_name
,
tar_package_path
))
tar_package_path
))
sh
.
tar
(
which_sys
=
platform
.
system
()
"cvzf"
,
if
which_sys
==
"Linux"
:
"%s"
%
tar_package_path
,
sh
.
tar
(
glob
.
glob
(
"%s/*"
%
project_dir
),
"cvzf"
,
"--exclude"
,
"%s"
%
tar_package_path
,
"%s/_tmp"
%
project_dir
,
glob
.
glob
(
"%s/*"
%
project_dir
),
_fg
=
True
)
"--exclude"
,
"%s/_tmp"
%
project_dir
,
_fg
=
True
)
elif
which_sys
==
"Darwin"
:
sh
.
tar
(
"--exclude"
,
"%s/_tmp"
%
project_dir
,
"-cvzf"
,
"%s"
%
tar_package_path
,
glob
.
glob
(
"%s/*"
%
project_dir
),
_fg
=
True
)
print
(
"Packaging Done!
\n
"
)
print
(
"Packaging Done!
\n
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录