Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
3beb997f
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看板
提交
3beb997f
编写于
7月 26, 2019
作者:
B
Bin Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support elementwise mul for DSP
上级
81dbde4e
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
14 addition
and
5 deletion
+14
-5
mace/python/tools/converter_tool/hexagon_converter.py
mace/python/tools/converter_tool/hexagon_converter.py
+13
-4
mace/python/tools/converter_tool/transformer.py
mace/python/tools/converter_tool/transformer.py
+1
-1
third_party/nnlib/v60/libhexagon_nn_skel.so
third_party/nnlib/v60/libhexagon_nn_skel.so
+0
-0
third_party/nnlib/v66/libhexagon_nn_skel.so
third_party/nnlib/v66/libhexagon_nn_skel.so
+0
-0
未找到文件。
mace/python/tools/converter_tool/hexagon_converter.py
浏览文件 @
3beb997f
...
...
@@ -44,6 +44,7 @@ HexagonSupportedOps = [
'QuantizedAvgPool_8'
,
'QuantizedConcat_8'
,
'QuantizedMaxPool_8'
,
'QuantizedMul_8x8to8'
,
'QuantizedResizeBilinear_8'
,
'QuantizedSoftmax_8'
,
'QuantizedSub_8p8to8'
,
...
...
@@ -69,7 +70,8 @@ class HexagonOps(object):
HexagonOp
.
DepthwiseSupernode_8x8p32to8
.
name
,
MaceOp
.
Dequantize
.
name
:
HexagonOp
.
DequantizeOUTPUT_8tof
.
name
,
MaceOp
.
Eltwise
.
name
:
[
HexagonOp
.
QuantizedAdd_8p8to8
.
name
,
HexagonOp
.
QuantizedSub_8p8to8
.
name
],
HexagonOp
.
QuantizedSub_8p8to8
.
name
,
HexagonOp
.
QuantizedMul_8x8to8
.
name
],
MaceOp
.
Identity
.
name
:
HexagonOp
.
Nop
.
name
,
MaceOp
.
Quantize
.
name
:
HexagonOp
.
QuantizeINPUT_f_to_8
.
name
,
MaceOp
.
Pooling
.
name
:
[
HexagonOp
.
QuantizedAvgPool_8
.
name
,
...
...
@@ -189,6 +191,11 @@ class HexagonConverter(base_converter.ConverterInterface):
elif
op
.
type
==
MaceOp
.
Eltwise
.
name
:
self
.
add_min_max_const_node
(
op
,
op
.
input
[
0
])
self
.
add_min_max_const_node
(
op
,
op
.
input
[
1
])
element_type
=
\
ConverterUtil
.
get_arg
(
op
,
MaceKeyword
.
mace_element_type_str
).
i
if
element_type
==
EltwiseType
.
SUM
.
value
\
or
element_type
==
EltwiseType
.
SUB
.
value
:
self
.
add_min_max_const_node
(
op
,
op
.
output
[
0
],
True
,
True
,
False
)
elif
op
.
type
==
MaceOp
.
BatchToSpaceND
.
name
\
...
...
@@ -340,9 +347,11 @@ class HexagonConverter(base_converter.ConverterInterface):
op
.
type
=
HexagonOp
.
QuantizedAdd_8p8to8
.
name
elif
element_type
==
EltwiseType
.
SUB
.
value
:
op
.
type
=
HexagonOp
.
QuantizedSub_8p8to8
.
name
elif
element_type
==
EltwiseType
.
PROD
.
value
:
op
.
type
=
HexagonOp
.
QuantizedMul_8x8to8
.
name
else
:
mace_check
(
False
,
"Hexagon does not support el
t
mentwise %s"
"Hexagon does not support el
e
mentwise %s"
%
EltwiseType
(
element_type
).
name
)
elif
op
.
type
==
MaceOp
.
Pooling
.
name
:
pooling_type_arg
=
ConverterUtil
.
get_arg
(
...
...
mace/python/tools/converter_tool/transformer.py
浏览文件 @
3beb997f
...
...
@@ -1911,7 +1911,7 @@ class Transformer(base_converter.ConverterInterface):
-
producer_op1
.
quantize_info
[
0
].
minval
else
:
mace_check
(
False
,
"Quantized Elementwise only support:"
" SUM and SUB now."
)
" SUM and SUB
without ranges
now."
)
quantize_info
=
\
self
.
add_quantize_info
(
op
,
minval
,
maxval
)
self
.
_quantize_activation_info
[
op
.
output
[
0
]]
=
quantize_info
...
...
third_party/nnlib/v60/libhexagon_nn_skel.so
浏览文件 @
3beb997f
无法预览此类型文件
third_party/nnlib/v66/libhexagon_nn_skel.so
浏览文件 @
3beb997f
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录