Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
毕竟曾有刹那
Mace
提交
7d376f2e
Mace
项目概览
毕竟曾有刹那
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
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,发现更多精彩内容 >>
提交
7d376f2e
编写于
6月 19, 2018
作者:
L
liuqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update document and tools help information.
上级
de834c4e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
67 deletion
+18
-67
docs/getting_started/how_to_build.rst
docs/getting_started/how_to_build.rst
+9
-60
tools/converter.py
tools/converter.py
+8
-6
tools/sh_commands.py
tools/sh_commands.py
+1
-1
未找到文件。
docs/getting_started/how_to_build.rst
浏览文件 @
7d376f2e
...
...
@@ -34,7 +34,7 @@ MiAI Compute Engine requires the following dependencies:
-
`
bazel
installation
<
https
://
docs
.
bazel
.
build
/
versions
/
master
/
install
.
html
>`
__
*
-
android
-
ndk
-
r15c
/
r16b
-
reference
the
docker
file
-
`
NDK
installation
<
https
://
developer
.
android
.
com
/
ndk
/
guides
/
setup
>`
__
or
reference
the
docker
file
*
-
adb
-
>=
1.0.32
-
apt
-
get
install
android
-
tools
-
adb
...
...
@@ -63,6 +63,10 @@ MiAI Compute Engine requires the following dependencies:
-
>=
17.09.0
-
ce
-
`
install
doc
<
https
://
docs
.
docker
.
com
/
install
/
linux
/
docker
-
ce
/
ubuntu
/#
set
-
up
-
the
-
repository
>`
__
..
note
::
``
export
ANDROID_NDK_HOME
=/
path
/
to
/
ndk
``
to
Specify
ANDROID_NDK_HOME
MiAI
Compute
Engine
provides
Dockerfile
with
these
dependencies
installed
,
you
can
build
the
image
from
the
Dockerfile
,
...
...
@@ -226,80 +230,24 @@ model conversion, compiling, test run, benchmark and correctness validation.
build
library
and
test
tools
.
*
*--
config
*
(
type
=
str
,
default
=
""
,
required
)
:
the
path
of
model
yaml
configuration
file
.
*
*--
tuning
*
(
default
=
false
,
optional
)
:
whether
tuning
the
parameters
for
the
GPU
of
specified
SoC
.
*
*--
enable_openmp
*
(
default
=
true
,
optional
)
:
whether
use
openmp
.
*
**
run
**
..
note
::
run
the
model
(
s
).
*
*--
config
*
(
type
=
str
,
default
=
""
,
required
)
:
the
path
of
model
yaml
configuration
file
.
*
*--
round
*
(
type
=
int
,
default
=
1
,
optional
)
:
times
for
run
.
*
*--
validate
*
(
default
=
false
,
optional
):
whether
to
verify
the
results
are
consistent
with
the
frameworks
。
*
*--
caffe_env
*
(
type
=
local
/
docker
,
default
=
docker
,
optional
)
:
you
can
specific
caffe
environment
for
validation
.
local
environment
or
caffe
docker
image
.
*
*--
restart_round
*
(
type
=
int
,
default
=
1
,
optional
)
:
restart
round
between
run
.
*
*--
gpu_out_of_range_check
*
(
default
=
false
,
optional
):
whether
check
out
of
memory
for
gpu
.
*
*--
vlog_level
*
(
type
=
int
[
0
-
5
],
default
=
0
,
optional
):
verbose
log
level
for
debug
.
..
warning
::
``
run
``
rely
on
``
build
``
command
,
you
should
``
run
``
after
``
build
``.
*
**
benchmark
**
*
*--
config
*
(
type
=
str
,
default
=
""
,
required
)
:
the
path
of
model
yaml
configuration
file
.
..
warning
::
``
benchmark
``
rely
on
``
build
``
command
,
you
should
``
benchmark
``
after
``
build
``.
**
common
arguments
**
..
list
-
table
::
:
widths
:
auto
:
header
-
rows
:
1
:
align
:
left
*
-
argument
(
key
)
-
argument
(
value
)
-
default
-
required
-
commands
-
explanation
*
-
--
omp_num_threads
-
int
-
-
1
-
N
-
``
run
``/``
benchmark
``
-
number
of
threads
*
-
--
cpu_affinity_policy
-
int
-
1
-
N
-
``
run
``/``
benchmark
``
-
0
:
AFFINITY_NONE
/
1
:
AFFINITY_BIG_ONLY
/
2
:
AFFINITY_LITTLE_ONLY
*
-
--
gpu_perf_hint
-
int
-
3
-
N
-
``
run
``/``
benchmark
``
-
0
:
DEFAULT
/
1
:
LOW
/
2
:
NORMAL
/
3
:
HIGH
*
-
--
gpu_perf_hint
-
int
-
3
-
N
-
``
run
``/``
benchmark
``
-
0
:
DEFAULT
/
1
:
LOW
/
2
:
NORMAL
/
3
:
HIGH
*
-
--
gpu_priority_hint
-
int
-
3
-
N
-
``
run
``/``
benchmark
``
-
0
:
DEFAULT
/
1
:
LOW
/
2
:
NORMAL
/
3
:
HIGH
Using
``-
h
``
to
get
detailed
help
.
Use
``-
h
``
to
get
detailed
help
.
..
code
::
sh
...
...
@@ -354,7 +302,7 @@ header files and packaged as
│
├──
mace
.
h
│
└──
mace_runtime
.
h
├──
libmace_mobilenet
-
v2
-
gpu
.
tar
.
gz
├──
lib
rary
├──
lib
│
├──
arm64
-
v8a
│
│
└──
libmace_mobilenet
-
v2
-
gpu
.
MI6
.
msm8998
.
a
│
└──
armeabi
-
v7a
...
...
@@ -420,6 +368,7 @@ Please refer to \ ``mace/examples/example.cc``\ for full usage. The following li
//
Include
the
headers
#
include
"mace/public/mace.h"
#
include
"mace/public/mace_runtime.h"
//
If
the
build_type
is
code
#
include
"mace/public/mace_engine_factory.h"
//
0.
Set
pre
-
compiled
OpenCL
binary
program
file
paths
when
available
...
...
tools/converter.py
浏览文件 @
7d376f2e
...
...
@@ -1210,7 +1210,7 @@ def parse_args():
type
=
str
,
default
=
""
,
required
=
True
,
help
=
"
model yaml configuration file path
"
)
help
=
"
the path of model yaml configuration file.
"
)
all_type_parent_parser
.
add_argument
(
"--build_type"
,
type
=
str
,
...
...
@@ -1258,7 +1258,7 @@ def parse_args():
build
.
add_argument
(
'--tuning'
,
action
=
"store_true"
,
help
=
"
tuning gpu parameters for specified SOC
"
)
help
=
"
whether tuning the parameters for the GPU of specified SoC.
"
)
build
.
add_argument
(
"--enable_openmp"
,
action
=
"store_false"
,
...
...
@@ -1277,17 +1277,19 @@ def parse_args():
run
.
add_argument
(
"--validate"
,
action
=
"store_true"
,
help
=
"validate result by comparing mace output and platform's output."
)
help
=
"whether to verify the results are consistent with "
"the frameworks."
)
run
.
add_argument
(
"--caffe_env"
,
type
=
str_to_caffe_env_type
,
default
=
'docker'
,
help
=
"[docker | local] caffe environment."
)
help
=
"[docker | local] you can specific caffe environment for"
" validation. local environment or caffe docker image."
)
run
.
add_argument
(
"--vlog_level"
,
type
=
int
,
default
=
0
,
help
=
"
VLOG level: [1~5]
."
)
help
=
"
[1~5]. Verbose log level for debug
."
)
run
.
add_argument
(
"--gpu_out_of_range_check"
,
action
=
"store_true"
,
...
...
@@ -1296,7 +1298,7 @@ def parse_args():
"--restart_round"
,
type
=
int
,
default
=
1
,
help
=
"restart round
for
run."
)
help
=
"restart round
between
run."
)
run
.
add_argument
(
"--report"
,
action
=
"store_true"
,
...
...
tools/sh_commands.py
浏览文件 @
7d376f2e
...
...
@@ -605,7 +605,7 @@ def update_libmace_shared_library(serial_num,
sh
.
cp
(
"-f"
,
"bazel-bin/mace/libmace.so"
,
library_dir
)
sh
.
cp
(
"-f"
,
"%s/sources/cxx-stl/gnu-libstdc++/4.9/libs/%s/libgnustl_shared.so"
%
(
os
.
environ
[
"ANDROID_NDK"
],
abi
),
(
os
.
environ
[
"ANDROID_NDK
_HOME
"
],
abi
),
library_dir
)
if
os
.
path
.
exists
(
"mace/libmace.so"
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录