Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
e7201c34
Mace
项目概览
Xiaomi
/
Mace
通知
106
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e7201c34
编写于
1月 29, 2018
作者:
李
李寅
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature_wuch' into 'master'
add hexagon_nn_set_graph_mode interface See merge request !229
上级
cbff4266
a85999d2
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
11 addition
and
0 deletion
+11
-0
mace/core/mace.cc
mace/core/mace.cc
+3
-0
mace/core/runtime/hexagon/hexagon_control_wrapper.cc
mace/core/runtime/hexagon/hexagon_control_wrapper.cc
+5
-0
mace/core/runtime/hexagon/hexagon_control_wrapper.h
mace/core/runtime/hexagon/hexagon_control_wrapper.h
+1
-0
mace/core/runtime/hexagon/hexagon_controller_dummy.cc
mace/core/runtime/hexagon/hexagon_controller_dummy.cc
+1
-0
mace/core/runtime/hexagon/hexagon_nn.h
mace/core/runtime/hexagon/hexagon_nn.h
+1
-0
mace/core/runtime/hexagon/libhexagon_controller.so
mace/core/runtime/hexagon/libhexagon_controller.so
+0
-0
未找到文件。
mace/core/mace.cc
浏览文件 @
e7201c34
...
...
@@ -525,6 +525,9 @@ MaceEngine::MaceEngine(const NetDef *net_def, DeviceType device_type) :
MACE_CHECK
(
hexagon_controller_
->
Init
(),
"hexagon init error"
);
hexagon_controller_
->
SetDebugLevel
(
static_cast
<
int
>
(
mace
::
internal
::
LogMessage
::
MinVLogLevel
()));
int
dsp_mode
=
ArgumentHelper
::
GetSingleArgument
<
NetDef
,
int
>
(
*
net_def
,
"dsp_mode"
,
0
);
hexagon_controller_
->
SetGraphMode
(
dsp_mode
);
MACE_CHECK
(
hexagon_controller_
->
SetupGraph
(
*
net_def
),
"hexagon setup graph error"
);
if
(
VLOG_IS_ON
(
2
))
{
...
...
mace/core/runtime/hexagon/hexagon_control_wrapper.cc
浏览文件 @
e7201c34
...
...
@@ -180,6 +180,11 @@ void HexagonControlWrapper::SetDebugLevel(int level) {
hexagon_nn_set_debug_level
(
nn_id_
,
level
);
}
void
HexagonControlWrapper
::
SetGraphMode
(
int
mode
)
{
LOG
(
INFO
)
<<
"Set dsp mode: "
<<
mode
;
hexagon_nn_set_graph_mode
(
nn_id_
,
mode
);
}
void
HexagonControlWrapper
::
GetPerfInfo
()
{
LOG
(
INFO
)
<<
"Get perf info"
;
vector
<
hexagon_nn_perfinfo
>
perf_info
(
MAX_NODE
);
...
...
mace/core/runtime/hexagon/hexagon_control_wrapper.h
浏览文件 @
e7201c34
...
...
@@ -33,6 +33,7 @@ class HexagonControlWrapper {
void
GetPerfInfo
();
void
ResetPerfInfo
();
void
SetDebugLevel
(
int
level
);
void
SetGraphMode
(
int
mode
);
private:
// CAVEAT: Need offset as HVX library reserves some ids
...
...
mace/core/runtime/hexagon/hexagon_controller_dummy.cc
浏览文件 @
e7201c34
...
...
@@ -17,6 +17,7 @@ int hexagon_controller_DeInitHexagon() {
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_config
)(
void
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_init
)(
void
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_set_debug_level
)(
hexagon_nn_nn_id
id
,
int
level
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_set_graph_mode
)(
hexagon_nn_nn_id
id
,
int
mode
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_snpprint
)(
hexagon_nn_nn_id
id
,
unsigned
char
*
buf
,
int
bufLen
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_getlog
)(
hexagon_nn_nn_id
id
,
unsigned
char
*
buf
,
int
bufLen
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_append_node
)(
hexagon_nn_nn_id
id
,
unsigned
int
node_id
,
unsigned
int
operation
,
hexagon_nn_padding_type
padding
,
const
hexagon_nn_input
*
inputs
,
int
inputsLen
,
const
hexagon_nn_output
*
outputs
,
int
outputsLen
)
__QAIC_HEADER_ATTRIBUTE
{
return
0
;
}
...
...
mace/core/runtime/hexagon/hexagon_nn.h
浏览文件 @
e7201c34
...
...
@@ -79,6 +79,7 @@ struct hexagon_nn_tensordef {
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_config
)(
void
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_init
)(
void
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_set_debug_level
)(
hexagon_nn_nn_id
id
,
int
level
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_set_graph_mode
)(
hexagon_nn_nn_id
id
,
int
mode
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_snpprint
)(
hexagon_nn_nn_id
id
,
unsigned
char
*
buf
,
int
bufLen
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_getlog
)(
hexagon_nn_nn_id
id
,
unsigned
char
*
buf
,
int
bufLen
)
__QAIC_HEADER_ATTRIBUTE
;
__QAIC_HEADER_EXPORT
int
__QAIC_HEADER
(
hexagon_nn_append_node
)(
hexagon_nn_nn_id
id
,
unsigned
int
node_id
,
unsigned
int
operation
,
hexagon_nn_padding_type
padding
,
const
hexagon_nn_input
*
inputs
,
int
inputsLen
,
const
hexagon_nn_output
*
outputs
,
int
outputsLen
)
__QAIC_HEADER_ATTRIBUTE
;
...
...
mace/core/runtime/hexagon/libhexagon_controller.so
浏览文件 @
e7201c34
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录