Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
a6fbba65
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a6fbba65
编写于
5月 27, 2020
作者:
L
Leo Chen
提交者:
GitHub
5月 27, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename inplace/no_need_buffer inferer, part3, test=develop (#24734)
上级
4aa90990
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
46 addition
and
50 deletion
+46
-50
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
+2
-3
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
+2
-2
paddle/fluid/operators/sequence_ops/sequence_concat_op.cc
paddle/fluid/operators/sequence_ops/sequence_concat_op.cc
+2
-3
paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc
paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc
+4
-4
paddle/fluid/operators/sequence_ops/sequence_expand_op.cc
paddle/fluid/operators/sequence_ops/sequence_expand_op.cc
+5
-5
paddle/fluid/operators/sequence_ops/sequence_pad_op.cc
paddle/fluid/operators/sequence_ops/sequence_pad_op.cc
+2
-2
paddle/fluid/operators/sequence_ops/sequence_pool_op.cc
paddle/fluid/operators/sequence_ops/sequence_pool_op.cc
+2
-2
paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc
paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc
+3
-3
paddle/fluid/operators/sequence_ops/sequence_slice_op.cc
paddle/fluid/operators/sequence_ops/sequence_slice_op.cc
+2
-2
paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc
paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc
+3
-3
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
-2
paddle/fluid/operators/squeeze_op.cc
paddle/fluid/operators/squeeze_op.cc
+2
-2
paddle/fluid/operators/strided_slice_op.cc
paddle/fluid/operators/strided_slice_op.cc
+2
-2
paddle/fluid/operators/trace_op.cc
paddle/fluid/operators/trace_op.cc
+2
-3
paddle/fluid/operators/unfold_op.cc
paddle/fluid/operators/unfold_op.cc
+2
-2
paddle/fluid/operators/unsqueeze_op.cc
paddle/fluid/operators/unsqueeze_op.cc
+2
-3
paddle/fluid/operators/warpctc_op.cc
paddle/fluid/operators/warpctc_op.cc
+2
-2
paddle/fluid/operators/where_op.cc
paddle/fluid/operators/where_op.cc
+2
-3
未找到文件。
paddle/fluid/operators/reduce_ops/reduce_mean_op.cc
浏览文件 @
a6fbba65
...
...
@@ -82,8 +82,7 @@ class ReduceMeanDoubleGradOpBaseMaker : public imperative::GradOpBaseMakerBase {
}
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ReduceMeanGradNoNeedBufferVarInference
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ReduceMeanGradNoNeedBufferVarInferer
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -99,7 +98,7 @@ REGISTER_OPERATOR(reduce_mean, ops::ReduceOp, __reduce_meanMaker__,
REGISTER_OPERATOR
(
reduce_mean_grad
,
ops
::
ReduceGradOp
,
ops
::
ReduceMeanDoubleGradDescMaker
,
ops
::
ReduceMeanDoubleGradOpBaseMaker
,
ops
::
ReduceMeanGradNoNeedBufferVarInfere
nce
);
ops
::
ReduceMeanGradNoNeedBufferVarInfere
r
);
REGISTER_OP_CPU_KERNEL
(
reduce_mean
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
,
ops
::
MeanFunctor
>
,
...
...
paddle/fluid/operators/reduce_ops/reduce_sum_op.cc
浏览文件 @
a6fbba65
...
...
@@ -51,7 +51,7 @@ class ReduceSumOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ReduceSumGradNoNeedBufferVarInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
ReduceSumGradNoNeedBufferVarInfere
r
,
"X"
);
class
ReduceSumVarTypeInference
:
public
paddle
::
framework
::
VarTypeInference
{
public:
void
operator
()(
paddle
::
framework
::
InferVarTypeContext
*
ctx
)
const
override
{
...
...
@@ -77,7 +77,7 @@ REGISTER_OPERATOR(reduce_sum, ops::ReduceOp, ReduceSumOpMaker,
ops
::
ReduceSumOpGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
ReduceSumOpGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
reduce_sum_grad
,
ops
::
ReduceGradOp
,
ops
::
ReduceSumGradNoNeedBufferVarInfere
nce
);
ops
::
ReduceSumGradNoNeedBufferVarInfere
r
);
REGISTER_OP_CPU_KERNEL
(
reduce_sum
,
ops
::
ReduceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
,
...
...
paddle/fluid/operators/sequence_ops/sequence_concat_op.cc
浏览文件 @
a6fbba65
...
...
@@ -123,8 +123,7 @@ class SeqConcatGradOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SeqConcatGradNoNeedBufferVarsInference
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SeqConcatGradNoNeedBufferVarsInferer
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -140,7 +139,7 @@ REGISTER_OP_CPU_KERNEL(sequence_concat, Kernel<float>, Kernel<double>,
Kernel
<
int
>
,
Kernel
<
int64_t
>
);
REGISTER_OPERATOR
(
sequence_concat_grad
,
op
::
SeqConcatGradOp
,
op
::
SeqConcatGradNoNeedBufferVarsInfere
nce
);
op
::
SeqConcatGradNoNeedBufferVarsInfere
r
);
template
<
typename
T
>
using
GradKernel
=
op
::
SeqConcatGradKernel
<
paddle
::
platform
::
CPUDeviceContext
,
T
>
;
...
...
paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc
浏览文件 @
a6fbba65
...
...
@@ -181,10 +181,10 @@ class SequenceExpandAsOpGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandAsOpNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandAsOpNoNeedBufferVarsInfere
r
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandAsGradOpNoNeedBufferVarsInfere
nce
,
"X"
,
"Y"
);
SequenceExpandAsGradOpNoNeedBufferVarsInfere
r
,
"X"
,
"Y"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -194,9 +194,9 @@ REGISTER_OPERATOR(
sequence_expand_as
,
ops
::
SequenceExpandAsOp
,
ops
::
SequenceExpandAsOpMaker
,
ops
::
SequenceExpandAsOpGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequenceExpandAsOpGradOpMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
SequenceExpandAsOpNoNeedBufferVarsInfere
nce
);
ops
::
SequenceExpandAsOpNoNeedBufferVarsInfere
r
);
REGISTER_OPERATOR
(
sequence_expand_as_grad
,
ops
::
SequenceExpandAsOpGrad
,
ops
::
SequenceExpandAsGradOpNoNeedBufferVarsInfere
nce
);
ops
::
SequenceExpandAsGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_expand_as
,
ops
::
SequenceExpandAsKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/sequence_ops/sequence_expand_op.cc
浏览文件 @
a6fbba65
...
...
@@ -247,10 +247,10 @@ class SequenceExpandOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandOpNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandOpNoNeedBufferVarsInfere
r
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandGradOpNoNeedBufferVarsInference
,
"X"
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceExpandGradOpNoNeedBufferVarsInferer
,
"X"
,
"Y"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -260,9 +260,9 @@ REGISTER_OPERATOR(sequence_expand, ops::SequenceExpandOp,
ops
::
SequenceExpandOpMaker
,
ops
::
SequenceExpandOpGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequenceExpandOpGradMaker
<
paddle
::
imperative
::
OpBase
>
,
ops
::
SequenceExpandOpNoNeedBufferVarsInfere
nce
);
ops
::
SequenceExpandOpNoNeedBufferVarsInfere
r
);
REGISTER_OPERATOR
(
sequence_expand_grad
,
ops
::
SequenceExpandOpGrad
,
ops
::
SequenceExpandGradOpNoNeedBufferVarsInfere
nce
);
ops
::
SequenceExpandGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_expand
,
ops
::
SequenceExpandKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/sequence_ops/sequence_pad_op.cc
浏览文件 @
a6fbba65
...
...
@@ -251,7 +251,7 @@ class SequencePadGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequencePadGradOpNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequencePadGradOpNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
...
...
@@ -262,7 +262,7 @@ REGISTER_OPERATOR(sequence_pad, ops::SequencePadOp, ops::SequencePadOpMaker,
ops
::
SequencePadGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequencePadGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
sequence_pad_grad
,
ops
::
SequencePadGradOp
,
ops
::
SequencePadGradOpNoNeedBufferVarsInfere
nce
);
ops
::
SequencePadGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_pad
,
ops
::
SequencePadOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/sequence_ops/sequence_pool_op.cc
浏览文件 @
a6fbba65
...
...
@@ -166,7 +166,7 @@ class SequencePoolGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequencePoolGradOpNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequencePoolGradOpNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
...
...
@@ -177,7 +177,7 @@ REGISTER_OPERATOR(sequence_pool, ops::SequencePoolOp, ops::SequencePoolOpMaker,
ops
::
SequencePoolGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequencePoolGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
sequence_pool_grad
,
ops
::
SequencePoolGradOp
,
ops
::
SequencePoolGradOpNoNeedBufferVarsInfere
nce
);
ops
::
SequencePoolGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_pool
,
ops
::
SequencePoolKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
);
...
...
paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc
浏览文件 @
a6fbba65
...
...
@@ -168,8 +168,8 @@ class SequenceScatterGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceScatterGradNoNeedBufferVarsInference
,
"Updates"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceScatterGradNoNeedBufferVarsInferer
,
"Updates"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -180,7 +180,7 @@ REGISTER_OPERATOR(sequence_scatter, ops::SequenceScatterOp,
ops
::
SequenceScatterGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequenceScatterGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
sequence_scatter_grad
,
ops
::
SequenceScatterGradOp
,
ops
::
SequenceScatterGradNoNeedBufferVarsInfere
nce
);
ops
::
SequenceScatterGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_scatter
,
ops
::
SequenceScatterOpKernel
<
float
>
,
ops
::
SequenceScatterOpKernel
<
double
>
,
ops
::
SequenceScatterOpKernel
<
int
>
,
...
...
paddle/fluid/operators/sequence_ops/sequence_slice_op.cc
浏览文件 @
a6fbba65
...
...
@@ -137,7 +137,7 @@ class SequenceSliceGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceSliceGradNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceSliceGradNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
...
...
@@ -149,7 +149,7 @@ REGISTER_OPERATOR(sequence_slice, ops::SequenceSliceOp,
ops
::
SequenceSliceGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequenceSliceGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
sequence_slice_grad
,
ops
::
SequenceSliceGradOp
,
ops
::
SequenceSliceGradNoNeedBufferVarsInfere
nce
);
ops
::
SequenceSliceGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_slice
,
ops
::
SequenceSliceOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc
浏览文件 @
a6fbba65
...
...
@@ -169,8 +169,8 @@ class SequenceUnpadGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceUnpadGradOpNoNeedBufferVarsInference
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SequenceUnpadGradOpNoNeedBufferVarsInferer
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -181,7 +181,7 @@ REGISTER_OPERATOR(sequence_unpad, ops::SequenceUnpadOp,
ops
::
SequenceUnpadGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SequenceUnpadGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
sequence_unpad_grad
,
ops
::
SequenceUnpadGradOp
,
ops
::
SequenceUnpadGradOpNoNeedBufferVarsInfere
nce
);
ops
::
SequenceUnpadGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
sequence_unpad
,
ops
::
SequenceUnpadOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/space_to_depth_op.cc
浏览文件 @
a6fbba65
...
...
@@ -131,7 +131,7 @@ class SpaceToDepthOpMaker : public framework::OpProtoAndCheckerMaker {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SpaceToDepthGradOpNoBuffer
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SpaceToDepthGradOpNoBuffer
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
::
SpaceToDepthGradOpNoBuffer
);
ops
::
SpaceToDepthGradOpNoBuffer
Inferer
);
REGISTER_OP_CPU_KERNEL
(
space_to_depth
,
ops
::
SpaceToDepthKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/squared_l2_distance_op.cc
浏览文件 @
a6fbba65
...
...
@@ -88,7 +88,8 @@ class SquaredL2DistanceOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SquaredL2DistanceGradOpNoBuffer
,
"X"
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SquaredL2DistanceGradOpNoBufferInferer
,
"X"
,
"Y"
);
template
<
typename
T
>
class
SquaredL2DistanceGradOpMaker
:
public
framework
::
SingleGradOpMaker
<
T
>
{
...
...
@@ -192,7 +193,7 @@ REGISTER_OPERATOR(
ops
::
SquaredL2DistanceGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SquaredL2DistanceGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
squared_l2_distance_grad
,
ops
::
SquaredL2DistanceGradOp
,
ops
::
SquaredL2DistanceGradOpNoBuffer
);
ops
::
SquaredL2DistanceGradOpNoBuffer
Inferer
);
REGISTER_OP_CPU_KERNEL
(
squared_l2_distance
,
ops
::
SquaredL2DistanceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
);
...
...
paddle/fluid/operators/squeeze_op.cc
浏览文件 @
a6fbba65
...
...
@@ -275,7 +275,7 @@ DECLARE_INPLACE_OP_INFERER(SequeezeInplaceInferer, {"X", "Out"});
DECLARE_INPLACE_OP_INFERER
(
SequeezeGradInplaceInferer
,
{
framework
::
GradVarName
(
"Out"
),
framework
::
GradVarName
(
"X"
)});
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SqueezeGradNoNeedBufferVarsInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
SqueezeGradNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -284,7 +284,7 @@ REGISTER_OPERATOR(squeeze, ops::SqueezeOp, ops::SqueezeOpMaker,
ops
::
SqueezeGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
SqueezeGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
squeeze_grad
,
ops
::
SqueezeGradOp
,
ops
::
SqueezeGradNoNeedBufferVarsInfere
nce
);
ops
::
SqueezeGradNoNeedBufferVarsInfere
r
);
REGISTER_OPERATOR
(
squeeze2
,
ops
::
Squeeze2Op
,
ops
::
Squeeze2OpMaker
,
ops
::
Squeeze2GradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
...
...
paddle/fluid/operators/strided_slice_op.cc
浏览文件 @
a6fbba65
...
...
@@ -304,7 +304,7 @@ class StridedSliceOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
StridedSliceOpGradNoNeedBufferVarsInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
StridedSliceOpGradNoNeedBufferVarsInfere
r
,
"Input"
);
}
// namespace operators
...
...
@@ -315,7 +315,7 @@ REGISTER_OPERATOR(strided_slice, ops::StridedSliceOp, ops::StridedSliceOpMaker,
ops
::
StridedSliceOpGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
StridedSliceOpGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
strided_slice_grad
,
ops
::
StridedSliceOpGrad
,
ops
::
StridedSliceOpGradNoNeedBufferVarsInfere
nce
);
ops
::
StridedSliceOpGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
strided_slice
,
...
...
paddle/fluid/operators/trace_op.cc
浏览文件 @
a6fbba65
...
...
@@ -147,8 +147,7 @@ class TraceGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
TraceGradNoNeedBufferVarsInference
,
"Input"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
TraceGradNoNeedBufferVarsInferer
,
"Input"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -159,7 +158,7 @@ REGISTER_OPERATOR(trace, ops::TraceOp, ops::TraceOpMaker,
ops
::
TraceGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
trace_grad
,
ops
::
TraceOpGrad
,
ops
::
TraceGradNoNeedBufferVarsInfere
nce
);
ops
::
TraceGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
trace
,
ops
::
TraceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
int
>
,
ops
::
TraceKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/unfold_op.cc
浏览文件 @
a6fbba65
...
...
@@ -174,7 +174,7 @@ class UnfoldGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
UnfoldGradOpNoNeedBufferVarsInfere
nce
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
UnfoldGradOpNoNeedBufferVarsInfere
r
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -184,7 +184,7 @@ REGISTER_OPERATOR(unfold, ops::UnfoldOp, ops::UnfoldOpMaker,
ops
::
UnfoldGradMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
UnfoldGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
unfold_grad
,
ops
::
UnfoldGradOp
,
ops
::
UnfoldGradOpNoNeedBufferVarsInfere
nce
);
ops
::
UnfoldGradOpNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
unfold
,
ops
::
UnfoldOpKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/unsqueeze_op.cc
浏览文件 @
a6fbba65
...
...
@@ -306,8 +306,7 @@ DECLARE_INPLACE_OP_INFERER(UnsqueezeInplaceInferer, {"X", "Out"});
DECLARE_INPLACE_OP_INFERER
(
UnsqueezeGradInplaceInferer
,
{
framework
::
GradVarName
(
"Out"
),
framework
::
GradVarName
(
"X"
)});
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
UnsqueezeGradOpNoNeedBufferVarInference
,
"X"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
UnsqueezeGradOpNoNeedBufferVarInferer
,
"X"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -316,7 +315,7 @@ REGISTER_OPERATOR(unsqueeze, ops::UnsqueezeOp, ops::UnsqueezeOpMaker,
ops
::
UnsqueezeGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
UnsqueezeGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
unsqueeze_grad
,
ops
::
UnsqueezeGradOp
,
ops
::
UnsqueezeGradOpNoNeedBufferVarInfere
nce
);
ops
::
UnsqueezeGradOpNoNeedBufferVarInfere
r
);
REGISTER_OPERATOR
(
unsqueeze2
,
ops
::
Unsqueeze2Op
,
ops
::
Unsqueeze2OpMaker
,
ops
::
Unsqueeze2GradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
...
...
paddle/fluid/operators/warpctc_op.cc
浏览文件 @
a6fbba65
...
...
@@ -184,7 +184,7 @@ class WarpCTCGradOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
WarpCTCGradOpNoNeedBufferVarInfere
nce
,
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
WarpCTCGradOpNoNeedBufferVarInfere
r
,
"Logits"
);
}
// namespace operators
...
...
@@ -195,7 +195,7 @@ REGISTER_OPERATOR(warpctc, ops::WarpCTCOp, ops::WarpCTCOpMaker,
ops
::
WarpCTCGradOpMaker
<
paddle
::
framework
::
OpDesc
>
,
ops
::
WarpCTCGradOpMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
warpctc_grad
,
ops
::
WarpCTCGradOp
,
ops
::
WarpCTCGradOpNoNeedBufferVarInfere
nce
);
ops
::
WarpCTCGradOpNoNeedBufferVarInfere
r
);
REGISTER_OP_CPU_KERNEL
(
warpctc
,
ops
::
WarpCTCKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
);
REGISTER_OP_CPU_KERNEL
(
...
...
paddle/fluid/operators/where_op.cc
浏览文件 @
a6fbba65
...
...
@@ -135,8 +135,7 @@ class WhereOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
WhereGradNoNeedBufferVarsInference
,
"X"
,
"Y"
);
DECLARE_NO_NEED_BUFFER_VARS_INFERER
(
WhereGradNoNeedBufferVarsInferer
,
"X"
,
"Y"
);
}
// namespace operators
}
// namespace paddle
...
...
@@ -146,7 +145,7 @@ REGISTER_OPERATOR(where, ops::WhereOp, ops::WhereOpMaker,
ops
::
WhereOpGradMaker
<
paddle
::
imperative
::
OpBase
>
);
REGISTER_OPERATOR
(
where_grad
,
ops
::
WhereGradOp
,
ops
::
WhereGradNoNeedBufferVarsInfere
nce
);
ops
::
WhereGradNoNeedBufferVarsInfere
r
);
REGISTER_OP_CPU_KERNEL
(
where
,
ops
::
WhereKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
WhereKernel
<
paddle
::
platform
::
CPUDeviceContext
,
double
>
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录