Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
c0911fdd
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
c0911fdd
编写于
5月 28, 2020
作者:
L
Leo Chen
提交者:
GitHub
5月 28, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename inplace/no_need_buffer inferer, part4, test=develop (#24781)
上级
be82de4c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
21 addition
and
21 deletion
+21
-21
paddle/fluid/operators/concat_op.cc
paddle/fluid/operators/concat_op.cc
+2
-2
paddle/fluid/operators/crop_op.cc
paddle/fluid/operators/crop_op.cc
+2
-2
paddle/fluid/operators/cvm_op.cc
paddle/fluid/operators/cvm_op.cc
+4
-4
paddle/fluid/operators/roll_op.cc
paddle/fluid/operators/roll_op.cc
+2
-2
paddle/fluid/operators/scatter_nd_add_op.cc
paddle/fluid/operators/scatter_nd_add_op.cc
+2
-2
paddle/fluid/operators/scatter_op.cc
paddle/fluid/operators/scatter_op.cc
+2
-2
paddle/fluid/operators/slice_op.cc
paddle/fluid/operators/slice_op.cc
+2
-2
paddle/fluid/operators/space_to_depth_op.cc
paddle/fluid/operators/space_to_depth_op.cc
+2
-2
paddle/fluid/operators/squared_l2_distance_op.cc
paddle/fluid/operators/squared_l2_distance_op.cc
+3
-3
未找到文件。
paddle/fluid/operators/concat_op.cc
浏览文件 @
c0911fdd
...
...
@@ -175,7 +175,7 @@ class ConcatOpGrad : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ConcatOpGradNoNeedBufferVarInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ConcatOpGradNoNeedBufferVarInfere
r
,
"X"
);
template
<
typename
T
>
class
ConcatGradOpMaker
:
public
framework
::
SingleGradOpMaker
<
T
>
{
...
...
@@ -203,7 +203,7 @@ REGISTER_OPERATOR(concat, ops::ConcatOp, ops::ConcatOpMaker,
ops
::
ConcatGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
ConcatGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
concat_grad
,
ops
::
ConcatOpGrad
,
ops
::
ConcatOpGradNoNeedBufferVarInfere
nce
);
ops
::
ConcatOpGradNoNeedBufferVarInfere
r
);
REGISTER_OP_CPU_KERNEL
(
concat
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
ops
::
ConcatKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/crop_op.cc
浏览文件 @
c0911fdd
...
...
@@ -203,7 +203,7 @@ class CropGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
GropNoNeedBufferVarInfere
nce
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
GropNoNeedBufferVarInfere
r
,
"Y"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -212,7 +212,7 @@ namespace ops = paddle::operators;
REGISTER_OPERATOR
(
crop
,
ops
::
CropOp
,
ops
::
CropOpMaker
,
ops
::
CropGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
CropGradOpMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
GropNoNeedBufferVarInfere
nce
);
ops
::
GropNoNeedBufferVarInfere
r
);
REGISTER_OPERATOR
(
crop_grad
,
ops
::
CropOpGrad
);
REGISTER_OP_CPU_KERNEL
(
crop
,
ops
::
CropKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/cvm_op.cc
浏览文件 @
c0911fdd
...
...
@@ -153,8 +153,8 @@ class CVMGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
CVMNoNeedBufferVarInfere
nce
,
"CVM"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
CVMGradNoNeedBufferVarInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
CVMNoNeedBufferVarInfere
r
,
"CVM"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
CVMGradNoNeedBufferVarInfere
r
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -163,10 +163,10 @@ namespace ops = paddle::operators;
REGISTER_OPERATOR
(
cvm
,
ops
::
CVMOp
,
ops
::
CVMOpMaker
,
ops
::
CVMGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
CVMGradOpMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
CVMNoNeedBufferVarInfere
nce
);
ops
::
CVMNoNeedBufferVarInfere
r
);
REGISTER_OPERATOR
(
cvm_grad
,
ops
::
CVMGradientOp
,
ops
::
CVMGradNoNeedBufferVarInfere
nce
);
ops
::
CVMGradNoNeedBufferVarInfere
r
);
REGISTER_OP_CPU_KERNEL
(
cvm
,
ops
::
CVMOpKernel
<
float
>
,
ops
::
CVMOpKernel
<
double
>
);
...
...
paddle/fluid/operators/roll_op.cc
浏览文件 @
c0911fdd
...
...
@@ -121,7 +121,7 @@ class RollGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
RollGradNoNeedBufferVarsInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
RollGradNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -130,7 +130,7 @@ REGISTER_OPERATOR(roll, ops::RollOp, ops::RollOpMaker,
ops
::
RollGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
RollGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
roll_grad
,
ops
::
RollGradOp
,
ops
::
RollGradNoNeedBufferVarsInfere
nce
);
ops
::
RollGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
roll
,
ops
::
RollKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
RollKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
...
...
paddle/fluid/operators/scatter_nd_add_op.cc
浏览文件 @
c0911fdd
...
...
@@ -170,7 +170,7 @@ class ScatterNdAddGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ScatterNdAddGradNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ScatterNdAddGradNoNeedBufferVarsInfere
r
,
"Updates"
);
}
// namespace operators
...
...
@@ -183,7 +183,7 @@ REGISTER_OPERATOR(scatter_nd_add, ops::ScatterNdAddOp, ops::ScatterNdAddOpMaker,
ops
::
ScatterNdAddGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
scatter_nd_add_grad
,
ops
::
ScatterNdAddGradOp
,
ops
::
ScatterNdAddGradNoNeedBufferVarsInfere
nce
);
ops
::
ScatterNdAddGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
scatter_nd_add
,
ops
::
ScatterNdAddOpKernel
<
float
>
,
ops
::
ScatterNdAddOpKernel
<
double
>
,
...
...
paddle/fluid/operators/scatter_op.cc
浏览文件 @
c0911fdd
...
...
@@ -134,7 +134,7 @@ class ScatterGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ScatterGradNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ScatterGradNoNeedBufferVarsInfere
r
,
"Updates"
);
DECLARE_INPLACE_OP_INFERER
(
ScatterInplaceInferer
,
{
"X"
,
"Out"
});
...
...
@@ -151,7 +151,7 @@ REGISTER_OPERATOR(scatter, ops::ScatterOp, ops::ScatterOpMaker,
ops
::
ScatterGradMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
ScatterInplaceInferer
);
REGISTER_OPERATOR
(
scatter_grad
,
ops
::
ScatterGradOp
,
ops
::
ScatterGradNoNeedBufferVarsInfere
nce
,
ops
::
ScatterGradNoNeedBufferVarsInfere
r
,
ops
::
ScatterGradInplaceInferer
);
REGISTER_OP_CPU_KERNEL
(
scatter
,
ops
::
ScatterOpKernel
<
float
>
,
ops
::
ScatterOpKernel
<
double
>
,
ops
::
ScatterOpKernel
<
int
>
,
...
...
paddle/fluid/operators/slice_op.cc
浏览文件 @
c0911fdd
...
...
@@ -377,7 +377,7 @@ class SliceDoubleOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SliceOpGradNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SliceOpGradNoNeedBufferVarsInfere
r
,
"Input"
);
}
// namespace operators
...
...
@@ -391,7 +391,7 @@ REGISTER_OPERATOR(slice, ops::SliceOp, ops::SliceOpMaker,
REGISTER_OPERATOR
(
slice_grad
,
ops
::
SliceOpGrad
,
ops
::
SliceDoubleOpGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SliceDoubleOpGradMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
SliceOpGradNoNeedBufferVarsInfere
nce
,
ops
::
SliceOpGradNoNeedBufferVarsInfere
r
,
ops
::
SliceOpGradVarTypeInference
);
REGISTER_OP_CPU_KERNEL
(
...
...
paddle/fluid/operators/space_to_depth_op.cc
浏览文件 @
c0911fdd
...
...
@@ -131,7 +131,7 @@ class SpaceToDepthOpMaker : public framework::OpProtoAndCheckerMaker {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SpaceToDepthGradOpNoBufferInferer
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SpaceToDepthGradOpNoBuffer
Vars
Inferer
,
"X"
);
template
<
typename
T
>
class
SpaceToDepthGradOpMaker
:
public
framework
::
SingleGradOpMaker
<
T
>
{
...
...
@@ -179,7 +179,7 @@ REGISTER_OPERATOR(space_to_depth, ops::SpaceToDepthOp, ops::SpaceToDepthOpMaker,
ops
::
SpaceToDepthGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SpaceToDepthGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
space_to_depth_grad
,
ops
::
SpaceToDepthGradOp
,
ops
::
SpaceToDepthGradOpNoBufferInferer
);
ops
::
SpaceToDepthGradOpNoBuffer
Vars
Inferer
);
REGISTER_OP_CPU_KERNEL
(
space_to_depth
,
ops
::
SpaceToDepthKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/squared_l2_distance_op.cc
浏览文件 @
c0911fdd
...
...
@@ -88,8 +88,8 @@ class SquaredL2DistanceOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SquaredL2DistanceGradOpNoBuffer
Inferer
,
"X"
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SquaredL2DistanceGradOpNoBuffer
VarsInferer
,
"
X"
,
"
Y"
);
template
<
typename
T
>
class
SquaredL2DistanceGradOpMaker
:
public
framework
::
SingleGradOpMaker
<
T
>
{
...
...
@@ -193,7 +193,7 @@ REGISTER_OPERATOR(
ops
::
SquaredL2DistanceGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SquaredL2DistanceGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
squared_l2_distance_grad
,
ops
::
SquaredL2DistanceGradOp
,
ops
::
SquaredL2DistanceGradOpNoBufferInferer
);
ops
::
SquaredL2DistanceGradOpNoBuffer
Vars
Inferer
);
REGISTER_OP_CPU_KERNEL
(
squared_l2_distance
,
ops
::
SquaredL2DistanceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录