Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
as350144
Mace
提交
36c5f7d5
Mace
项目概览
as350144
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
2
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
36c5f7d5
编写于
12月 04, 2017
作者:
L
liuqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unsed code for concat.
上级
f6006d5e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
20 deletion
+2
-20
mace/ops/BUILD
mace/ops/BUILD
+0
-16
mace/ops/concat_benchmark.cc
mace/ops/concat_benchmark.cc
+2
-4
未找到文件。
mace/ops/BUILD
浏览文件 @
36c5f7d5
...
...
@@ -61,22 +61,6 @@ cc_test(
],
)
cc_test
(
name
=
"concat_test"
,
testonly
=
1
,
srcs
=
glob
(
[
"concat_test.cc"
],
),
copts
=
[
"-std=c++11"
],
linkopts
=
[
"-fopenmp"
],
linkstatic
=
1
,
deps
=
[
":ops"
,
":test"
,
"@gtest//:gtest_main"
,
],
)
cc_test
(
name
=
"ops_benchmark"
,
testonly
=
1
,
...
...
mace/ops/concat_benchmark.cc
浏览文件 @
36c5f7d5
...
...
@@ -15,7 +15,7 @@ static void ConcatHelper(int iters, int concat_dim, int dim1) {
OpDefBuilder
(
"Concat"
,
"ConcatBM"
)
.
Input
(
"Input0"
)
.
Input
(
"Input1"
)
.
Input
(
"Axis"
)
.
AddIntArg
(
"axis"
,
concat_dim
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
NewOperatorDef
());
...
...
@@ -23,7 +23,6 @@ static void ConcatHelper(int iters, int concat_dim, int dim1) {
const
int
kDim0
=
100
;
net
.
AddRandomInput
<
DeviceType
::
CPU
,
T
>
(
"Input0"
,
{
kDim0
,
dim1
});
net
.
AddRandomInput
<
DeviceType
::
CPU
,
T
>
(
"Input1"
,
{
kDim0
,
dim1
});
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
int32_t
>
(
"Axis"
,
{},
{
concat_dim
});
// Warm-up
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
...
...
@@ -60,14 +59,13 @@ static void OpenclConcatHelper(int iters,
// Add input data
net
.
AddRandomInput
<
DeviceType
::
OPENCL
,
float
>
(
"Input0"
,
shape0
);
net
.
AddRandomInput
<
DeviceType
::
OPENCL
,
float
>
(
"Input1"
,
shape1
);
net
.
AddInputFromArray
<
DeviceType
::
OPENCL
,
int32_t
>
(
"Axis"
,
{},
{
concat_dim
});
BufferToImage
<
DeviceType
::
OPENCL
,
T
>
(
net
,
"Input0"
,
"InputImage0"
,
kernels
::
BufferType
::
IN_OUT
);
BufferToImage
<
DeviceType
::
OPENCL
,
T
>
(
net
,
"Input1"
,
"InputImage1"
,
kernels
::
BufferType
::
IN_OUT
);
OpDefBuilder
(
"Concat"
,
"ConcatBM"
)
.
Input
(
"InputImage0"
)
.
Input
(
"InputImage1"
)
.
Input
(
"Axis"
)
.
AddIntArg
(
"axis"
,
concat_dim
)
.
Output
(
"OutputImage"
)
.
AddIntArg
(
"T"
,
static_cast
<
int
>
(
DataTypeToEnum
<
T
>::
value
))
.
Finalize
(
net
.
NewOperatorDef
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录