Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
d2a63e5a
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d2a63e5a
编写于
8月 05, 2019
作者:
H
Huie
提交者:
zp7
8月 05, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.add flatten2 kernel not implemented. 2.add density_prior_box kernel not implemented (#1781)
上级
ba30ff10
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
202 addition
and
1 deletion
+202
-1
src/framework/load_ops.h
src/framework/load_ops.h
+6
-1
src/operators/flatten2_op.cpp
src/operators/flatten2_op.cpp
+32
-0
src/operators/flatten2_op.h
src/operators/flatten2_op.h
+34
-0
src/operators/kernel/cl/cl_kernel/density_prior_box_kernel.cl
...operators/kernel/cl/cl_kernel/density_prior_box_kernel.cl
+9
-0
src/operators/kernel/cl/cl_kernel/flatten2_kernel.cl
src/operators/kernel/cl/cl_kernel/flatten2_kernel.cl
+8
-0
src/operators/kernel/cl/density_prior_box_kernel.cpp
src/operators/kernel/cl/density_prior_box_kernel.cpp
+39
-0
src/operators/kernel/cl/flatten2_kernel.cpp
src/operators/kernel/cl/flatten2_kernel.cpp
+37
-0
src/operators/kernel/flatten2_kernel.h
src/operators/kernel/flatten2_kernel.h
+28
-0
src/operators/prior_box_op.cpp
src/operators/prior_box_op.cpp
+3
-0
tools/op.cmake
tools/op.cmake
+6
-0
未找到文件。
src/framework/load_ops.h
浏览文件 @
d2a63e5a
...
...
@@ -127,6 +127,9 @@ LOAD_OP2(transpose2, CPU, GPU_CL);
#ifdef PRIORBOX_OP
LOAD_OP2
(
prior_box
,
CPU
,
GPU_CL
);
#endif
#ifdef DENSITY_PRIORBOX_OP
LOAD_OP2
(
density_prior_box
,
CPU
,
GPU_CL
);
#endif
#ifdef FUSION_CONVADDRELU_OP
LOAD_OP3
(
fusion_conv_add_relu
,
CPU
,
GPU_CL
,
FPGA
);
LOAD_FUSION_MATCHER
(
fusion_conv_add_relu
);
...
...
@@ -158,7 +161,9 @@ LOAD_OP1(prelu, CPU);
#endif
#ifdef FLATTEN_OP
LOAD_OP1
(
flatten
,
CPU
);
LOAD_OP1
(
flatten2
,
CPU
);
#endif
#ifdef FLATTEN2_OP
LOAD_OP2
(
flatten2
,
CPU
,
GPU_CL
);
#endif
#ifdef FUSION_CONVBNADDRELU_OP
LOAD_OP3
(
fusion_conv_bn_add_relu
,
CPU
,
GPU_CL
,
FPGA
);
...
...
src/operators/flatten2_op.cpp
0 → 100644
浏览文件 @
d2a63e5a
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#include "operators/flatten2_op.h"
namespace
paddle_mobile
{
namespace
operators
{
template
<
typename
DeviceType
,
typename
T
>
void
Flatten2Op
<
DeviceType
,
T
>::
InferShape
()
const
{}
}
// namespace operators
}
// namespace paddle_mobile
namespace
ops
=
paddle_mobile
::
operators
;
#ifdef PADDLE_MOBILE_CL
REGISTER_OPERATOR_CL
(
flatten2
,
ops
::
Flatten2Op
);
#endif
#endif
src/operators/flatten2_op.h
0 → 100644
浏览文件 @
d2a63e5a
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#pragma once
#include <string>
#include <vector>
#include "framework/operator.h"
#include "operators/kernel/flatten2_kernel.h"
#include "operators/op_param.h"
namespace
paddle_mobile
{
namespace
operators
{
DECLARE_OPERATOR
(
Flatten2
,
FlattenParam
,
Flatten2Kernel
);
}
// namespace operators
}
// namespace paddle_mobile
#endif
src/operators/kernel/cl/cl_kernel/density_prior_box_kernel.cl
0 → 100644
浏览文件 @
d2a63e5a
__kernel
void
density_prior_box
()
{
}
\ No newline at end of file
src/operators/kernel/cl/cl_kernel/flatten2_kernel.cl
0 → 100644
浏览文件 @
d2a63e5a
__kernel
void
flatten2
()
{
}
\ No newline at end of file
src/operators/kernel/cl/density_prior_box_kernel.cpp
0 → 100644
浏览文件 @
d2a63e5a
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef DENSITY_PRIORBOX_OP
#include <operators/kernel/prior_box_kernel.h>
namespace
paddle_mobile
{
namespace
operators
{
template
<
>
bool
DensityPriorBoxKernel
<
GPU_CL
,
float
>::
Init
(
paddle_mobile
::
operators
::
DensityPriorBoxParam
<
paddle_mobile
::
GPU_CL
>
*
param
)
{
this
->
cl_helper_
.
AddKernel
(
"density_prior_box"
,
"density_prior_box_kernel.cl"
);
return
true
;
}
template
<
>
void
DensityPriorBoxKernel
<
GPU_CL
,
float
>::
Compute
(
const
paddle_mobile
::
operators
::
DensityPriorBoxParam
<
paddle_mobile
::
GPU_CL
>
&
param
)
{}
}
// namespace operators
}
// namespace paddle_mobile
#endif
src/operators/kernel/cl/flatten2_kernel.cpp
0 → 100644
浏览文件 @
d2a63e5a
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FLATTEN2_OP
#include "operators/kernel/flatten2_kernel.h"
namespace
paddle_mobile
{
namespace
operators
{
template
<
>
bool
Flatten2Kernel
<
GPU_CL
,
float
>::
Init
(
paddle_mobile
::
operators
::
FlattenParam
<
paddle_mobile
::
GPU_CL
>
*
param
)
{
this
->
cl_helper_
.
AddKernel
(
"flatten2"
,
"flatten2_kernel.cl"
);
return
true
;
}
template
<
>
void
Flatten2Kernel
<
GPU_CL
,
float
>::
Compute
(
const
paddle_mobile
::
operators
::
FlattenParam
<
paddle_mobile
::
GPU_CL
>
&
param
)
{}
}
// namespace operators
}
// namespace paddle_mobile
#endif
src/operators/kernel/flatten2_kernel.h
0 → 100644
浏览文件 @
d2a63e5a
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
//
// Created by hujie09 on 2019-07-31.
//
#ifdef FLATTEN2_OP
#include <operators/op_param.h>
#include "framework/operator.h"
namespace
paddle_mobile
{
namespace
operators
{
DECLARE_KERNEL
(
Flatten2
,
FlattenParam
)
}
}
// namespace paddle_mobile
#endif // FLATTEN2_KERNEL
src/operators/prior_box_op.cpp
浏览文件 @
d2a63e5a
...
...
@@ -95,4 +95,7 @@ REGISTER_OPERATOR_CPU(density_prior_box, ops::DensityPriorBoxOp);
#ifdef PRIORBOX_OP
REGISTER_OPERATOR_CL
(
prior_box
,
ops
::
PriorBoxOp
);
#endif // PRIORBOX_OP
#ifdef DENSITY_PRIORBOX_OP
REGISTER_OPERATOR_CL
(
density_prior_box
,
ops
::
DensityPriorBoxOp
);
#endif // DENSITY_PRIORBOX_OP
#endif // PADDLE_MOBILE_CL
tools/op.cmake
浏览文件 @
d2a63e5a
...
...
@@ -237,6 +237,7 @@ if (CON GREATER -1)
set
(
BOXCODER_OP ON
)
set
(
MULTICLASSNMS_OP ON
)
set
(
FLATTEN_OP ON
)
set
(
FLATTEN2_OP ON
)
set
(
SPLIT_OP ON
)
set
(
SHAPE_OP ON
)
...
...
@@ -328,6 +329,7 @@ if(NOT FOUND_MATCH)
set
(
BILINEAR_INTERP_OP ON
)
set
(
SPLIT_OP ON
)
set
(
FLATTEN_OP ON
)
set
(
FLATTEN2_OP ON
)
set
(
SHAPE_OP ON
)
set
(
ELEMENTWISEMUL_OP ON
)
set
(
SUM_OP ON
)
...
...
@@ -555,6 +557,10 @@ if (FLATTEN_OP)
add_definitions
(
-DFLATTEN_OP
)
endif
()
if
(
FLATTEN2_OP
)
add_definitions
(
-DFLATTEN2_OP
)
endif
()
if
(
SPLIT_OP
)
add_definitions
(
-DSPLIT_OP
)
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录