Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c3080386
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看板
未验证
提交
c3080386
编写于
7月 20, 2023
作者:
Z
zyfncg
提交者:
GitHub
7月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename hard_sigmoid to hardsigmoid for kernel name (#55559)
上级
ab00c96c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
11 addition
and
11 deletion
+11
-11
paddle/phi/api/yaml/backward.yaml
paddle/phi/api/yaml/backward.yaml
+1
-1
paddle/phi/api/yaml/ops.yaml
paddle/phi/api/yaml/ops.yaml
+1
-1
paddle/phi/kernels/cpu/activation_grad_kernel.cc
paddle/phi/kernels/cpu/activation_grad_kernel.cc
+1
-1
paddle/phi/kernels/cpu/activation_kernel.cc
paddle/phi/kernels/cpu/activation_kernel.cc
+1
-1
paddle/phi/kernels/gpu/activation_grad_kernel.cu
paddle/phi/kernels/gpu/activation_grad_kernel.cu
+1
-1
paddle/phi/kernels/gpu/activation_kernel.cu
paddle/phi/kernels/gpu/activation_kernel.cu
+1
-1
paddle/phi/kernels/xpu/activation_grad_kernel.cc
paddle/phi/kernels/xpu/activation_grad_kernel.cc
+3
-3
paddle/phi/kernels/xpu/activation_kernel.cc
paddle/phi/kernels/xpu/activation_kernel.cc
+2
-2
未找到文件。
paddle/phi/api/yaml/backward.yaml
浏览文件 @
c3080386
...
...
@@ -991,7 +991,7 @@
func
:
UnchangedInferMeta
param
:
[
out
]
kernel
:
func
:
hard
_
sigmoid_grad
func
:
hardsigmoid_grad
inplace
:
(out_grad -> x_grad)
-
backward_op
:
hardtanh_grad
...
...
paddle/phi/api/yaml/ops.yaml
浏览文件 @
c3080386
...
...
@@ -1090,7 +1090,7 @@
func
:
UnchangedInferMeta
param
:
[
x
]
kernel
:
func
:
hard
_
sigmoid
func
:
hardsigmoid
backward
:
hardsigmoid_grad
-
op
:
hardtanh
...
...
paddle/phi/kernels/cpu/activation_grad_kernel.cc
浏览文件 @
c3080386
...
...
@@ -391,7 +391,7 @@ PD_REGISTER_ACTIVATION_GRAD_KERNEL(softsign_grad, SoftsignGradKernel)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_grad
,
SigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_double_grad
,
SigmoidDoubleGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_triple_grad
,
SigmoidTripleGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hard
_
sigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hardsigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
logsigmoid_grad
,
LogSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
log_grad
,
LogGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
log2_grad
,
Log2GradKernel
)
...
...
paddle/phi/kernels/cpu/activation_kernel.cc
浏览文件 @
c3080386
...
...
@@ -219,7 +219,7 @@ PD_REGISTER_KERNEL(
PD_REGISTER_ACTIVATION_KERNEL
(
softsign
,
SoftsignKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
sigmoid
,
SigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
logsigmoid
,
LogSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
hard
_
sigmoid
,
HardSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
hardsigmoid
,
HardSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
swish
,
SwishKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
relu6
,
Relu6Kernel
)
...
...
paddle/phi/kernels/gpu/activation_grad_kernel.cu
浏览文件 @
c3080386
...
...
@@ -472,7 +472,7 @@ PD_REGISTER_ACTIVATION_GRAD_KERNEL(softsign_grad, SoftsignGradKernel)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_grad
,
SigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_double_grad
,
SigmoidDoubleGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
sigmoid_triple_grad
,
SigmoidTripleGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hard
_
sigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hardsigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
logsigmoid_grad
,
LogSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
log_grad
,
LogGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
log2_grad
,
Log2GradKernel
)
...
...
paddle/phi/kernels/gpu/activation_kernel.cu
浏览文件 @
c3080386
...
...
@@ -279,7 +279,7 @@ PD_REGISTER_ACTIVATION_KERNEL(silu, SiluKernel)
PD_REGISTER_ACTIVATION_KERNEL
(
softsign
,
SoftsignKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
sigmoid
,
SigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
logsigmoid
,
LogSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
hard
_
sigmoid
,
HardSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
hardsigmoid
,
HardSigmoidKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
hardswish
,
HardSwishKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
swish
,
SwishKernel
)
PD_REGISTER_ACTIVATION_KERNEL
(
round
,
RoundKernel
)
...
...
paddle/phi/kernels/xpu/activation_grad_kernel.cc
浏览文件 @
c3080386
...
...
@@ -276,13 +276,13 @@ struct XPUHardSigmoidGradFunctor : public funcs::BaseActivationFunctor<T> {
int
r
=
xpu
::
hard_sigmoid_grad
(
xpu_context
,
reinterpret_cast
<
const
XPUType
*>
(
y_data
),
// hard
_
sigmoid_grad do not need x_data
y_data
),
// hardsigmoid_grad do not need x_data
reinterpret_cast
<
const
XPUType
*>
(
y_data
),
reinterpret_cast
<
const
XPUType
*>
(
y_grad
),
reinterpret_cast
<
XPUType
*>
(
x_grad
),
dx
->
numel
(),
slope
);
PADDLE_ENFORCE_XDNN_SUCCESS
(
r
,
"hard
_
sigmoid_grad"
);
PADDLE_ENFORCE_XDNN_SUCCESS
(
r
,
"hardsigmoid_grad"
);
}
};
...
...
@@ -703,7 +703,7 @@ PD_REGISTER_KERNEL(square_grad,
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
exp_grad
,
ExpGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
log_grad
,
LogGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
leaky_relu_grad
,
LeakyReluGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hard
_
sigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hardsigmoid_grad
,
HardSigmoidGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
hardswish_grad
,
HardSwishGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
reciprocal_grad
,
ReciprocalGradKernel
)
PD_REGISTER_ACTIVATION_GRAD_KERNEL
(
relu6_grad
,
Relu6GradKernel
)
...
...
paddle/phi/kernels/xpu/activation_kernel.cc
浏览文件 @
c3080386
...
...
@@ -240,7 +240,7 @@ struct XPUHardSigmoidFunctor : public funcs::BaseActivationFunctor<T> {
using
XPUType
=
typename
XPUTypeTrait
<
T
>::
Type
;
int
r
=
xpu_activation_1attr_func
<
Context
,
T
,
XPUType
>
(
dev_ctx
,
x
,
out
,
slope
,
xpu
::
hard_sigmoid
<
XPUType
>
);
PADDLE_ENFORCE_XDNN_SUCCESS
(
r
,
"hard
_
sigmoid"
);
PADDLE_ENFORCE_XDNN_SUCCESS
(
r
,
"hardsigmoid"
);
}
};
...
...
@@ -549,7 +549,7 @@ PD_REGISTER_KERNEL(
sigmoid
,
XPU
,
ALL_LAYOUT
,
phi
::
SigmoidKernel
,
float
,
phi
::
dtype
::
float16
)
{}
PD_REGISTER_KERNEL
(
swish
,
XPU
,
ALL_LAYOUT
,
phi
::
SwishKernel
,
float
,
phi
::
dtype
::
float16
)
{}
PD_REGISTER_KERNEL
(
hard
_
sigmoid
,
PD_REGISTER_KERNEL
(
hardsigmoid
,
XPU
,
ALL_LAYOUT
,
phi
::
HardSigmoidKernel
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录