Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
ef748943
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,发现更多精彩内容 >>
提交
ef748943
编写于
11月 04, 2020
作者:
L
lichao18
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix fp16 delegator register
上级
d043ef53
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
802 addition
and
47 deletion
+802
-47
mace/ops/arm/base/depthwise_conv_2d_3x3.cc
mace/ops/arm/base/depthwise_conv_2d_3x3.cc
+0
-20
mace/ops/arm/base/gemm.cc
mace/ops/arm/base/gemm.cc
+0
-23
mace/ops/arm/fp16/depthwise_conv_2d_3x3.cc
mace/ops/arm/fp16/depthwise_conv_2d_3x3.cc
+12
-0
mace/ops/arm/fp16/gemm.cc
mace/ops/arm/fp16/gemm.cc
+780
-0
mace/ops/registry/op_delegators_registry.cc
mace/ops/registry/op_delegators_registry.cc
+9
-3
tools/bazel_build_standalone_lib.sh
tools/bazel_build_standalone_lib.sh
+1
-1
未找到文件。
mace/ops/arm/base/depthwise_conv_2d_3x3.cc
浏览文件 @
ef748943
...
...
@@ -20,16 +20,6 @@ namespace mace {
namespace
ops
{
namespace
arm
{
extern
template
MaceStatus
DepthwiseConv2dK3x3S1
<
float16_t
>
::
DoCompute
(
const
DepthwiseConvComputeParam
&
p
,
const
float16_t
*
filter_data
,
const
float16_t
*
input_data
,
float16_t
*
output_data
);
extern
template
MaceStatus
DepthwiseConv2dK3x3S2
<
float16_t
>
::
DoCompute
(
const
DepthwiseConvComputeParam
&
p
,
const
float16_t
*
filter_data
,
const
float16_t
*
input_data
,
float16_t
*
output_data
);
namespace
{
template
<
typename
T
>
void
DepthwiseConv2d3x3Pixel
(
const
T
*
in_base
,
...
...
@@ -474,16 +464,6 @@ void RegisterDepthwiseConv2dK3x3Delegator(OpDelegatorRegistry *registry) {
delegator
::
DepthwiseConv2dParam
,
MACE_DELEGATOR_KEY_EX
(
DepthwiseConv2d
,
DeviceType
::
CPU
,
BFloat16
,
ImplType
::
NEON
,
K3x3S2
));
MACE_REGISTER_FP16_DELEGATOR
(
registry
,
DepthwiseConv2dK3x3S1
<
float16_t
>
,
delegator
::
DepthwiseConv2dParam
,
MACE_DELEGATOR_KEY_EX
(
DepthwiseConv2d
,
DeviceType
::
CPU
,
float16_t
,
ImplType
::
NEON
,
K3x3S1
));
MACE_REGISTER_FP16_DELEGATOR
(
registry
,
DepthwiseConv2dK3x3S2
<
float16_t
>
,
delegator
::
DepthwiseConv2dParam
,
MACE_DELEGATOR_KEY_EX
(
DepthwiseConv2d
,
DeviceType
::
CPU
,
float16_t
,
ImplType
::
NEON
,
K3x3S2
));
}
}
// namespace arm
...
...
mace/ops/arm/base/gemm.cc
浏览文件 @
ef748943
...
...
@@ -23,24 +23,6 @@ namespace mace {
namespace
ops
{
namespace
arm
{
extern
template
void
Gemm
<
float16_t
>
::
Pack8x4
(
const
MatrixMap
<
const
float16_t
>
&
matrix
,
MatrixMajor
dst_major
,
float16_t
*
packed_matrix
);
extern
template
void
Gemm
<
float16_t
>
::
Unpack8x8
(
const
float16_t
*
packed_output
,
MatrixMap
<
float16_t
>
*
output
);
extern
template
void
Gemm
<
float16_t
>
::
PackLhs
(
const
MatrixMap
<
const
float16_t
>
&
lhs
,
float16_t
*
packed_lhs
);
extern
template
void
Gemm
<
float16_t
>
::
PackRhs
(
const
MatrixMap
<
const
float16_t
>
&
rhs
,
float16_t
*
packed_rhs
);
extern
template
void
Gemm
<
float16_t
>
::
UnpackOutput
(
const
float16_t
*
packed_output
,
MatrixMap
<
float16_t
>
*
output
);
extern
template
MaceStatus
Gemm
<
float16_t
>
::
Compute
(
const
OpContext
*
context
,
const
Tensor
*
lhs
,
const
Tensor
*
rhs
,
const
index_t
batch
,
const
index_t
rows
,
const
index_t
cols
,
const
index_t
depth
,
const
MatrixMajor
lhs_major
,
const
MatrixMajor
rhs_major
,
const
MatrixMajor
output_major
,
const
bool
lhs_batched
,
const
bool
rhs_batched
,
Tensor
*
output
);
template
<
typename
T
>
void
Gemm
<
T
>::
Pack4x4
(
const
MatrixMap
<
const
T
>
&
matrix
,
MatrixMajor
dst_major
,
T
*
packed_matrix
)
{
...
...
@@ -719,12 +701,7 @@ void RegisterGemmDelegator(OpDelegatorRegistry *registry) {
MACE_REGISTER_BF16_DELEGATOR
(
registry
,
Gemm
<
BFloat16
>
,
delegator
::
GemmParam
,
MACE_DELEGATOR_KEY
(
Gemm
,
DeviceType
::
CPU
,
BFloat16
,
ImplType
::
NEON
));
MACE_REGISTER_FP16_DELEGATOR
(
registry
,
Gemm
<
float16_t
>
,
delegator
::
GemmParam
,
MACE_DELEGATOR_KEY
(
Gemm
,
DeviceType
::
CPU
,
float16_t
,
ImplType
::
NEON
));
}
}
// namespace arm
}
// namespace ops
}
// namespace mace
mace/ops/arm/fp16/depthwise_conv_2d_3x3.cc
浏览文件 @
ef748943
...
...
@@ -403,6 +403,18 @@ MaceStatus DepthwiseConv2dK3x3S2<float16_t>::DoCompute(
return
MaceStatus
::
MACE_SUCCESS
;
}
void
RegisterFP16DepthwiseConv2dK3x3Delegator
(
OpDelegatorRegistry
*
registry
)
{
MACE_REGISTER_FP16_DELEGATOR
(
registry
,
DepthwiseConv2dK3x3S1
<
float16_t
>
,
delegator
::
DepthwiseConv2dParam
,
MACE_DELEGATOR_KEY_EX
(
DepthwiseConv2d
,
DeviceType
::
CPU
,
float16_t
,
ImplType
::
NEON
,
K3x3S1
));
MACE_REGISTER_FP16_DELEGATOR
(
registry
,
DepthwiseConv2dK3x3S2
<
float16_t
>
,
delegator
::
DepthwiseConv2dParam
,
MACE_DELEGATOR_KEY_EX
(
DepthwiseConv2d
,
DeviceType
::
CPU
,
float16_t
,
ImplType
::
NEON
,
K3x3S2
));
}
}
// namespace arm
}
// namespace ops
...
...
mace/ops/arm/fp16/gemm.cc
0 → 100644
浏览文件 @
ef748943
此差异已折叠。
点击以展开。
mace/ops/registry/op_delegators_registry.cc
浏览文件 @
ef748943
...
...
@@ -69,7 +69,11 @@ extern void RegisterGroupDeconv2dGeneralDelegator(
extern
void
RegisterGemmDelegator
(
OpDelegatorRegistry
*
registry
);
extern
void
RegisterGemvDelegator
(
OpDelegatorRegistry
*
registry
);
#ifdef MACE_ENABLE_FP16
extern
void
RegisterFP16DepthwiseConv2dK3x3Delegator
(
OpDelegatorRegistry
*
registry
);
extern
void
RegisterFP16GemmDelegator
(
OpDelegatorRegistry
*
registry
);
#endif
#ifdef MACE_ENABLE_QUANTIZE
namespace
q8
{
extern
void
RegisterEltwiseDelegator
(
OpDelegatorRegistry
*
registry
);
...
...
@@ -89,7 +93,6 @@ void RegisterAllOpDelegators(OpDelegatorRegistry *registry) {
ref
::
RegisterDepthwiseDeconv2dDelegator
(
registry
);
ref
::
RegisterGemmDelegator
(
registry
);
ref
::
RegisterGemvDelegator
(
registry
);
#ifdef MACE_ENABLE_QUANTIZE
ref
::
q8
::
RegisterEltwiseDelegator
(
registry
);
ref
::
q8
::
RegisterGemvDelegator
(
registry
);
...
...
@@ -123,7 +126,10 @@ void RegisterAllOpDelegators(OpDelegatorRegistry *registry) {
arm
::
RegisterGemmDelegator
(
registry
);
arm
::
RegisterGemvDelegator
(
registry
);
#ifdef MACE_ENABLE_FP16
arm
::
RegisterFP16DepthwiseConv2dK3x3Delegator
(
registry
);
arm
::
RegisterFP16GemmDelegator
(
registry
);
#endif
#ifdef MACE_ENABLE_QUANTIZE
arm
::
q8
::
RegisterEltwiseDelegator
(
registry
);
arm
::
q8
::
RegisterGemvDelegator
(
registry
);
...
...
tools/bazel_build_standalone_lib.sh
浏览文件 @
ef748943
...
...
@@ -115,7 +115,7 @@ $(echo "$1" | cut -d '=' -f -1)"
esac
done
if
[[
"
${
enable_apu
}
"
==
true
]]
;
then
if
[[
"
${
enable_apu
}
"
==
true
||
"
${
abi
}
"
!=
armeabi-v7a
||
"
${
abi
}
"
!=
arm64-v8a
]]
;
then
enable_rpcmem
=
false
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录