Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c551e55d
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 2 年 前同步成功
通知
2325
Star
20933
Fork
5424
代码
文件
提交
分支
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看板
未验证
提交
c551e55d
编写于
11月 09, 2022
作者:
H
HongyuJia
提交者:
GitHub
11月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean repetitious GetKernelTypeForVar (#47763)
上级
788d9328
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
1 addition
and
68 deletion
+1
-68
paddle/fluid/operators/bilateral_slice_op.cc
paddle/fluid/operators/bilateral_slice_op.cc
+0
-8
paddle/fluid/operators/correlation_op.cc
paddle/fluid/operators/correlation_op.cc
+0
-8
paddle/fluid/operators/fused/fused_bn_activation_op.cc
paddle/fluid/operators/fused/fused_bn_activation_op.cc
+0
-8
paddle/fluid/operators/fused/fused_bn_activation_op.h
paddle/fluid/operators/fused/fused_bn_activation_op.h
+0
-5
paddle/fluid/operators/partial_concat_op.cc
paddle/fluid/operators/partial_concat_op.cc
+0
-8
paddle/fluid/operators/put_along_axis_op.cc
paddle/fluid/operators/put_along_axis_op.cc
+0
-14
paddle/fluid/operators/take_along_axis_op.cc
paddle/fluid/operators/take_along_axis_op.cc
+0
-14
paddle/fluid/operators/transfer_layout_op.cc
paddle/fluid/operators/transfer_layout_op.cc
+1
-3
未找到文件。
paddle/fluid/operators/bilateral_slice_op.cc
浏览文件 @
c551e55d
...
...
@@ -90,14 +90,6 @@ class BilateralSliceOp : public framework::OperatorWithKernel {
return
framework
::
OpKernelType
(
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"X"
),
ctx
.
GetPlace
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
class
BilateralSliceOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
...
...
paddle/fluid/operators/correlation_op.cc
浏览文件 @
c551e55d
...
...
@@ -122,14 +122,6 @@ class CorrelationOp : public framework::OperatorWithKernel {
"X and Y shoule have the same datatype"
));
return
framework
::
OpKernelType
(
input_data_type
,
ctx
.
GetPlace
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
template
<
typename
T
>
...
...
paddle/fluid/operators/fused/fused_bn_activation_op.cc
浏览文件 @
c551e55d
...
...
@@ -196,14 +196,6 @@ framework::OpKernelType FusedBatchNormActOp::GetExpectedKernelType(
input_data_type
,
ctx
.
GetPlace
(),
layout
,
library
);
}
framework
::
OpKernelType
FusedBatchNormActOp
::
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
void
FusedBatchNormActOpMaker
::
Make
()
{
AddAttr
<
float
>
(
"momentum"
,
""
).
SetDefault
(
0.9
);
AddAttr
<
float
>
(
"epsilon"
,
""
)
...
...
paddle/fluid/operators/fused/fused_bn_activation_op.h
浏览文件 @
c551e55d
...
...
@@ -36,11 +36,6 @@ class FusedBatchNormActOp : public framework::OperatorWithKernel {
protected:
framework
::
OpKernelType
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
override
;
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
;
};
class
FusedBatchNormActGradOp
:
public
framework
::
OperatorWithKernel
{
...
...
paddle/fluid/operators/partial_concat_op.cc
浏览文件 @
c551e55d
...
...
@@ -108,14 +108,6 @@ class PartialConcatOp : public framework::OperatorWithKernel {
"All Inputs of PartialSum OP are Empty!"
));
return
framework
::
OpKernelType
(
input_data_type
,
ctx
.
GetPlace
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
class
PartialConcatGradOp
:
public
framework
::
OperatorWithKernel
{
...
...
paddle/fluid/operators/put_along_axis_op.cc
浏览文件 @
c551e55d
...
...
@@ -37,13 +37,6 @@ class PutAlongAxisOp : public framework::OperatorWithKernel {
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"Input"
),
ctx
.
device_context
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
class
PutAlongAxisOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
...
...
@@ -78,13 +71,6 @@ class PutAlongAxisGradOp : public framework::OperatorWithKernel {
ctx
,
framework
::
GradVarName
(
"Result"
)),
ctx
.
device_context
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
template
<
typename
T
>
...
...
paddle/fluid/operators/take_along_axis_op.cc
浏览文件 @
c551e55d
...
...
@@ -37,13 +37,6 @@ class TakeAlongAxisOp : public framework::OperatorWithKernel {
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"Input"
),
ctx
.
device_context
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
class
TakeAlongAxisOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
...
...
@@ -77,13 +70,6 @@ class TakeAlongAxisGradOp : public framework::OperatorWithKernel {
ctx
,
framework
::
GradVarName
(
"Result"
)),
ctx
.
device_context
());
}
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
tensor
.
place
(),
tensor
.
layout
());
}
};
template
<
typename
T
>
...
...
paddle/fluid/operators/transfer_layout_op.cc
浏览文件 @
c551e55d
...
...
@@ -66,9 +66,7 @@ class TransferLayoutOp : public framework::OperatorWithKernel {
const
std
::
string
&
var_name
,
const
phi
::
DenseTensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
expected_kernel_type
.
data_type_
,
expected_kernel_type
.
place_
,
expected_kernel_type
.
data_layout_
);
return
expected_kernel_type
;
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录