Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_77200941
mindspore
提交
65efb6d1
M
mindspore
项目概览
2301_77200941
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
65efb6d1
编写于
8月 24, 2020
作者:
S
sunsuodong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reshape_fp16
上级
6c309d8f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
2 deletion
+31
-2
mindspore/lite/nnacl/CMakeLists.txt
mindspore/lite/nnacl/CMakeLists.txt
+3
-1
mindspore/lite/src/runtime/kernel/arm/fp16/reshape_fp16.cc
mindspore/lite/src/runtime/kernel/arm/fp16/reshape_fp16.cc
+28
-1
未找到文件。
mindspore/lite/nnacl/CMakeLists.txt
浏览文件 @
65efb6d1
...
...
@@ -32,9 +32,11 @@ if (PLATFORM_ARM64)
)
set_target_properties
(
optimize PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
add_custom_command
(
TARGET optimize POST_BUILD
if
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
"Release"
)
add_custom_command
(
TARGET optimize POST_BUILD
COMMAND
${
ANDROID_NDK
}
/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/strip
${
TOP_DIR
}
/build/nnacl/liboptimize.so
)
endif
()
add_custom_command
(
TARGET optimize POST_BUILD
COMMAND rm -rf
${
TOP_DIR
}
/output/lib/liboptimize.so
...
...
mindspore/lite/src/runtime/kernel/arm/fp16/reshape_fp16.cc
浏览文件 @
65efb6d1
...
...
@@ -30,7 +30,7 @@ using mindspore::schema::PrimitiveType_Reshape;
namespace
mindspore
::
kernel
{
int
ReshapeCPUKernel
::
Run
()
{
int
Reshape
Fp16
CPUKernel
::
Run
()
{
auto
ret
=
Prepare
();
if
(
ret
!=
RET_OK
)
{
MS_LOG
(
ERROR
)
<<
"Prepare fail!ret: "
<<
ret
;
...
...
@@ -73,4 +73,31 @@ int ReshapeCPUKernel::Run() {
}
return
RET_OK
;
}
kernel
::
LiteKernel
*
CpuReshapeFp16KernelCreator
(
const
std
::
vector
<
lite
::
tensor
::
Tensor
*>
&
inputs
,
const
std
::
vector
<
lite
::
tensor
::
Tensor
*>
&
outputs
,
OpParameter
*
opParameter
,
const
Context
*
ctx
,
const
kernel
::
KernelKey
&
desc
,
const
mindspore
::
lite
::
PrimitiveC
*
primitive
)
{
if
(
opParameter
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"Input opParameter is nullptr!"
;
return
nullptr
;
}
MS_ASSERT
(
desc
.
type
==
schema
::
PrimitiveType_Reshape
);
auto
*
kernel
=
new
(
std
::
nothrow
)
ReshapeFp16CPUKernel
(
opParameter
,
inputs
,
outputs
,
ctx
,
primitive
);
if
(
kernel
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"new ReshapeFp16CPUKernel fail!"
;
return
nullptr
;
}
auto
ret
=
kernel
->
Init
();
if
(
ret
!=
RET_OK
)
{
delete
kernel
;
MS_LOG
(
ERROR
)
<<
"Init kernel failed, name: "
<<
opParameter
->
name_
<<
", type: "
<<
schema
::
EnumNamePrimitiveType
(
static_cast
<
schema
::
PrimitiveType
>
(
opParameter
->
type_
));
return
nullptr
;
}
return
kernel
;
}
REG_KERNEL
(
kCPU
,
kNumberTypeFloat16
,
PrimitiveType_Reshape
,
CpuReshapeFp16KernelCreator
)
}
// namespace mindspore::kernel
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录