Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
d2bd1536
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d2bd1536
编写于
8月 28, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5371 [MS][LITE][Develop]fix arithmetic fp16
Merge pull request !5371 from sunsuodong/fix_arithmetic2
上级
b178c0cc
0fce8a97
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
0 deletion
+28
-0
mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc
...spore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc
+28
-0
未找到文件。
mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc
浏览文件 @
d2bd1536
...
...
@@ -104,6 +104,7 @@ int ArithmeticFP16CPUKernel::Init() {
arithmetic_run_
=
ElementSubFp16
;
break
;
}
break
;
case
PrimitiveType_Div
:
switch
(
arithmeticParameter_
->
activation_type_
)
{
case
schema
::
ActivationType_RELU
:
...
...
@@ -116,32 +117,46 @@ int ArithmeticFP16CPUKernel::Init() {
arithmetic_run_
=
ElementDivFp16
;
break
;
}
break
;
case
PrimitiveType_FloorMod
:
arithmetic_run_
=
ElementFloorModFp16
;
break
;
case
PrimitiveType_FloorDiv
:
arithmetic_run_
=
ElementFloorDivFp16
;
break
;
case
PrimitiveType_LogicalAnd
:
arithmetic_run_
=
ElementLogicalAndFp16
;
break
;
case
PrimitiveType_LogicalOr
:
arithmetic_run_
=
ElementLogicalOrFp16
;
break
;
case
PrimitiveType_SquaredDifference
:
arithmetic_run_
=
ElementSquaredDifferenceFp16
;
break
;
case
PrimitiveType_Maximum
:
arithmetic_run_
=
ElementMaximumFp16
;
break
;
case
PrimitiveType_Minimum
:
arithmetic_run_
=
ElementMinimumFp16
;
break
;
case
PrimitiveType_NotEqual
:
arithmetic_run_
=
ElementNotEqualFp16
;
break
;
case
PrimitiveType_Equal
:
arithmetic_run_
=
ElementEqualFp16
;
break
;
case
PrimitiveType_Less
:
arithmetic_run_
=
ElementLessFp16
;
break
;
case
PrimitiveType_LessEqual
:
arithmetic_run_
=
ElementLessEqual
;
break
;
case
PrimitiveType_Greater
:
arithmetic_run_
=
ElementGreaterFp16
;
break
;
case
PrimitiveType_GreaterEqual
:
arithmetic_run_
=
ElementGreaterEqualFp16
;
break
;
default:
MS_LOG
(
ERROR
)
<<
"Error Operator type "
<<
op_parameter_
->
type_
;
arithmetic_run_
=
nullptr
;
...
...
@@ -219,42 +234,55 @@ int ArithmeticFP16CPUKernel::ReSize() {
case
PrimitiveType_FloorMod
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptFloorModFp16
;
break
;
case
PrimitiveType_FloorDiv
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptFloorDivFp16
;
break
;
case
PrimitiveType_LogicalAnd
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptLogicalAndFp16
;
break
;
case
PrimitiveType_LogicalOr
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptLogicalOrFp16
;
break
;
case
PrimitiveType_SquaredDifference
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptSquaredDifferenceFp16
;
break
;
case
PrimitiveType_Maximum
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptMaximumFp16
;
break
;
case
PrimitiveType_Minimum
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptMinimumFp16
;
break
;
case
PrimitiveType_NotEqual
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptNotEqualFp16
;
break
;
case
PrimitiveType_Equal
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptEqualFp16
;
break
;
case
PrimitiveType_Less
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptLessFp16
;
break
;
case
PrimitiveType_LessEqual
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptLessEqualFp16
;
break
;
case
PrimitiveType_Greater
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptGreaterFp16
;
break
;
case
PrimitiveType_GreaterEqual
:
arithmeticParameter_
->
broadcasting_
=
false
;
arithmetic_opt_run_
=
ElementOptGreaterEqualFp16
;
break
;
default:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录