Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
10e64565
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
10e64565
编写于
5月 05, 2019
作者:
S
superjomn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename OpKernel to KernelLite
上级
29f9aade
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
15 addition
and
15 deletion
+15
-15
paddle/fluid/lite/core/kernel.h
paddle/fluid/lite/core/kernel.h
+4
-4
paddle/fluid/lite/core/kernel_test.cc
paddle/fluid/lite/core/kernel_test.cc
+1
-1
paddle/fluid/lite/core/op_registry.h
paddle/fluid/lite/core/op_registry.h
+1
-1
paddle/fluid/lite/kernels/cuda/io_copy_compute.cc
paddle/fluid/lite/kernels/cuda/io_copy_compute.cc
+2
-2
paddle/fluid/lite/kernels/cuda/mul_compute.h
paddle/fluid/lite/kernels/cuda/mul_compute.h
+1
-1
paddle/fluid/lite/kernels/host/fc_compute.h
paddle/fluid/lite/kernels/host/fc_compute.h
+1
-1
paddle/fluid/lite/kernels/host/feed_compute.cc
paddle/fluid/lite/kernels/host/feed_compute.cc
+1
-1
paddle/fluid/lite/kernels/host/fetch_compute.cc
paddle/fluid/lite/kernels/host/fetch_compute.cc
+1
-1
paddle/fluid/lite/kernels/host/mul_compute.cc
paddle/fluid/lite/kernels/host/mul_compute.cc
+1
-1
paddle/fluid/lite/kernels/host/relu_compute.h
paddle/fluid/lite/kernels/host/relu_compute.h
+1
-1
paddle/fluid/lite/kernels/host/scale_compute.cc
paddle/fluid/lite/kernels/host/scale_compute.cc
+1
-1
未找到文件。
paddle/fluid/lite/core/kernel.h
浏览文件 @
10e64565
...
...
@@ -150,7 +150,7 @@ class KernelBase {
// MKLDNN, plain CUDA C implementations.
template
<
TargetType
Target
,
PrecisionType
Precision
,
DataLayoutType
DataLayout
=
DataLayoutType
::
kNCHW
>
class
OpKernel
:
public
KernelBase
{
class
KernelLite
:
public
KernelBase
{
public:
// Set runtime context.
void
SetContext
(
std
::
unique_ptr
<
KernelContext
>&&
ctx
)
{
ctx_
=
ctx
;
}
...
...
@@ -166,15 +166,15 @@ class OpKernel : public KernelBase {
void
Touch
()
{}
OpKernel
()
=
default
;
virtual
~
OpKernel
()
=
default
;
KernelLite
()
=
default
;
virtual
~
KernelLite
()
=
default
;
protected:
std
::
unique_ptr
<
KernelContext
>
ctx_
;
};
template
<
TargetType
Target
,
PrecisionType
Precision
,
DataLayoutType
DataLayout
>
std
::
string
OpKernel
<
Target
,
Precision
,
DataLayout
>::
name
()
const
{
std
::
string
KernelLite
<
Target
,
Precision
,
DataLayout
>::
name
()
const
{
return
op_type
()
+
":"
+
TargetToStr
(
Target
)
+
"/"
+
PrecisionToStr
(
Precision
)
+
"/"
+
DataLayoutToStr
(
DataLayout
);
}
...
...
paddle/fluid/lite/core/kernel_test.cc
浏览文件 @
10e64565
...
...
@@ -21,7 +21,7 @@ namespace lite {
namespace
core
{
int
test_code
{
-
1
};
class
SomeKernel
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
class
SomeKernel
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
public:
void
Run
()
override
{
LOG
(
INFO
)
<<
"SomeKernel executed"
;
...
...
paddle/fluid/lite/core/op_registry.h
浏览文件 @
10e64565
...
...
@@ -52,7 +52,7 @@ class OpLiteRegistor : public Registor<OpClass> {
template
<
TargetType
Target
,
PrecisionType
Precision
,
DataLayoutType
Layout
>
using
KernelRegistryForTarget
=
Factory
<
OpKernel
<
Target
,
Precision
,
Layout
>
,
std
::
unique_ptr
<
KernelBase
>>
;
Factory
<
KernelLite
<
Target
,
Precision
,
Layout
>
,
std
::
unique_ptr
<
KernelBase
>>
;
class
KernelRegistry
final
{
public:
...
...
paddle/fluid/lite/kernels/cuda/io_copy_compute.cc
浏览文件 @
10e64565
...
...
@@ -42,7 +42,7 @@ void CopyToHostSync(void* target, const void* source, size_t size) {
* This kernel copies a tensor from host to CUDA space.
*/
class
IoCopyHostToCudaCompute
:
public
OpKernel
<
TARGET
(
kCUDA
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
:
public
KernelLite
<
TARGET
(
kCUDA
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
public:
void
Run
()
override
{
auto
&
param
=
Param
<
operators
::
IoCopyParam
>
();
...
...
@@ -77,7 +77,7 @@ class IoCopyHostToCudaCompute
* This kernel copies a tensor from CUDA to host space.
*/
class
IoCopyCudaToHostCompute
:
public
OpKernel
<
TARGET
(
kCUDA
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
:
public
KernelLite
<
TARGET
(
kCUDA
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
public:
void
Run
()
override
{
auto
&
param
=
Param
<
operators
::
IoCopyParam
>
();
...
...
paddle/fluid/lite/kernels/cuda/mul_compute.h
浏览文件 @
10e64565
...
...
@@ -30,7 +30,7 @@ void mul_compute(const lite::cuda::Blas<float>& blas, const T* x, int x_h,
nullptr
,
out
,
x_h
);
}
class
MulCompute
:
public
OpKernel
<
TARGET
(
kCUDA
),
PRECISION
(
kFloat
)
>
{
class
MulCompute
:
public
KernelLite
<
TARGET
(
kCUDA
),
PRECISION
(
kFloat
)
>
{
public:
using
param_t
=
operators
::
MulParam
;
...
...
paddle/fluid/lite/kernels/host/fc_compute.h
浏览文件 @
10e64565
...
...
@@ -23,7 +23,7 @@ namespace lite {
namespace
kernels
{
namespace
host
{
class
FcCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
class
FcCompute
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
public:
using
param_t
=
operators
::
FcParam
;
...
...
paddle/fluid/lite/kernels/host/feed_compute.cc
浏览文件 @
10e64565
...
...
@@ -21,7 +21,7 @@ namespace kernels {
namespace
host
{
class
FeedCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
public:
using
param_t
=
operators
::
FeedParam
;
...
...
paddle/fluid/lite/kernels/host/fetch_compute.cc
浏览文件 @
10e64565
...
...
@@ -21,7 +21,7 @@ namespace kernels {
namespace
host
{
class
FetchCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
{
public:
using
param_t
=
operators
::
FeedParam
;
...
...
paddle/fluid/lite/kernels/host/mul_compute.cc
浏览文件 @
10e64565
...
...
@@ -35,7 +35,7 @@ void mul_compute_eigen(const T* x, int x_h, int x_w, const T* y, int y_h,
Out
=
X
*
Y
;
}
class
MulCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
class
MulCompute
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
public:
using
param_t
=
operators
::
MulParam
;
...
...
paddle/fluid/lite/kernels/host/relu_compute.h
浏览文件 @
10e64565
...
...
@@ -21,7 +21,7 @@ namespace lite {
namespace
kernels
{
namespace
host
{
class
ReluCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
class
ReluCompute
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
public:
void
Run
()
override
{
auto
&
theparam
=
Param
<
operators
::
ReluParam
>
();
...
...
paddle/fluid/lite/kernels/host/scale_compute.cc
浏览文件 @
10e64565
...
...
@@ -31,7 +31,7 @@ void scale_compute(const T* x, T* out, int size, float scale, float bias,
}
}
class
ScaleCompute
:
public
OpKernel
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
class
ScaleCompute
:
public
KernelLite
<
TARGET
(
kHost
),
PRECISION
(
kFloat
)
>
{
public:
using
param_t
=
operators
::
MulParam
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录