Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f551d9fe
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
f551d9fe
编写于
6月 10, 2022
作者:
C
Chen Weihang
提交者:
GitHub
6月 10, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Phi] Fix depthwise conv yaml error (#43379)
* fix depthwise conv yaml error * fix depthwise conv double grad error
上级
b4a93884
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
26 deletion
+32
-26
paddle/phi/kernels/gpudnn/conv_grad_grad_kernel.cu
paddle/phi/kernels/gpudnn/conv_grad_grad_kernel.cu
+9
-9
paddle/phi/ops/compat/depthwise_conv2d_sig.cc
paddle/phi/ops/compat/depthwise_conv2d_sig.cc
+2
-2
python/paddle/nn/functional/conv.py
python/paddle/nn/functional/conv.py
+1
-1
python/paddle/utils/code_gen/api.yaml
python/paddle/utils/code_gen/api.yaml
+8
-7
python/paddle/utils/code_gen/backward.yaml
python/paddle/utils/code_gen/backward.yaml
+12
-7
未找到文件。
paddle/phi/kernels/gpudnn/conv_grad_grad_kernel.cu
浏览文件 @
f551d9fe
...
...
@@ -663,13 +663,13 @@ void ConvCudnnGradGradKernel(
}
template
<
typename
T
,
typename
Context
>
void
DepthwiseConv
CudnnGradGrad
Kernel
(
void
DepthwiseConv
DoubleGradGPUDNN
Kernel
(
const
Context
&
ctx
,
const
paddle
::
optional
<
DenseTensor
>&
input_grad_grad
,
const
paddle
::
optional
<
DenseTensor
>&
filter_grad_grad
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
input
,
const
DenseTensor
&
filter
,
const
DenseTensor
&
out_grad
,
const
paddle
::
optional
<
DenseTensor
>&
input_grad_grad
,
const
paddle
::
optional
<
DenseTensor
>&
filter_grad_grad
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings_t
,
const
std
::
string
&
padding_algorithm
,
...
...
@@ -680,9 +680,9 @@ void DepthwiseConvCudnnGradGradKernel(
int
workspace_size_MB
,
bool
exhaustive_search_t
,
bool
fuse_relu
,
DenseTensor
*
out_grad_grad
,
DenseTensor
*
input_grad
,
DenseTensor
*
filter_grad
)
{
DenseTensor
*
filter_grad
,
DenseTensor
*
out_grad_grad
)
{
ConvCudnnGradGradKernel
<
T
>
(
ctx
,
input
,
filter
,
...
...
@@ -763,7 +763,7 @@ PD_REGISTER_KERNEL(conv3d_grad_grad,
PD_REGISTER_KERNEL
(
depthwise_conv2d_grad_grad
,
GPU
,
ALL_LAYOUT
,
phi
::
DepthwiseConv
CudnnGradGrad
Kernel
,
phi
::
DepthwiseConv
DoubleGradGPUDNN
Kernel
,
float
,
phi
::
dtype
::
float16
)
{}
#else
...
...
@@ -789,7 +789,7 @@ PD_REGISTER_KERNEL(conv3d_grad_grad,
PD_REGISTER_KERNEL
(
depthwise_conv2d_grad_grad
,
GPU
,
ALL_LAYOUT
,
phi
::
DepthwiseConv
CudnnGradGrad
Kernel
,
phi
::
DepthwiseConv
DoubleGradGPUDNN
Kernel
,
float
,
double
,
phi
::
dtype
::
float16
,
...
...
@@ -816,7 +816,7 @@ PD_REGISTER_KERNEL(conv3d_grad_grad,
PD_REGISTER_KERNEL
(
depthwise_conv2d_grad_grad
,
GPU
,
ALL_LAYOUT
,
phi
::
DepthwiseConv
CudnnGradGrad
Kernel
,
phi
::
DepthwiseConv
DoubleGradGPUDNN
Kernel
,
float
,
double
,
phi
::
dtype
::
float16
)
{}
...
...
paddle/phi/ops/compat/depthwise_conv2d_sig.cc
浏览文件 @
f551d9fe
...
...
@@ -53,7 +53,7 @@ KernelSignature DepthwiseConv2dGradOpArgumentMapping(
KernelSignature
DepthwiseConv2dDoubleGradOpArgumentMapping
(
const
ArgumentMappingContext
&
ctx
)
{
return
KernelSignature
(
"depthwise_conv2d_grad_grad"
,
{
"
DDInput"
,
"DDFilter"
,
"DOutput"
,
"Input"
,
"
Filter"
},
{
"
Input"
,
"Filter"
,
"DOutput"
,
"DDInput"
,
"DD
Filter"
},
{
"strides"
,
"paddings"
,
"padding_algorithm"
,
...
...
@@ -64,7 +64,7 @@ KernelSignature DepthwiseConv2dDoubleGradOpArgumentMapping(
"workspace_size_MB"
,
"exhaustive_search"
,
"fuse_relu_before_depthwise_conv"
},
{
"D
DOutput"
,
"DInput"
,
"DFilter
"
});
{
"D
Input"
,
"DFilter"
,
"DDOutput
"
});
}
}
// namespace phi
...
...
python/paddle/nn/functional/conv.py
浏览文件 @
f551d9fe
...
...
@@ -143,7 +143,7 @@ def _conv_nd(x,
if
in_dygraph_mode
()
and
op_type
==
"depthwise_conv2d"
:
pre_bias
=
_C_ops
.
final_state_depthwise_conv2d
(
x
,
weight
,
stride
,
padding
,
padding_algorithm
,
groups
,
dilation
,
data_format
,
False
,
-
1
,
False
,
False
)
data_format
,
False
,
-
1
,
False
,
False
,
use_cudnn
)
if
bias
is
not
None
:
channel_dim
=
channel_dim
+
len
(
x
.
shape
)
if
channel_dim
<
0
else
channel_dim
...
...
python/paddle/utils/code_gen/api.yaml
浏览文件 @
f551d9fe
...
...
@@ -499,15 +499,16 @@
backward
:
deformable_conv_grad
-
api
:
depthwise_conv2d
args
:
(Tensor x, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu)
args
:
(Tensor x, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu
, bool use_gpudnn
)
output
:
Tensor(out)
invoke
:
conv2d_impl(x, filter, strides, paddings, padding_algorithm, groups, dilations, data_format, use_addto, workspace_size_MB, exhaustive_search)
infer_meta
:
func
:
ConvInferMeta
param
:
[
x
,
filter
,
strides
,
paddings
,
padding_algorithm
,
groups
,
dilations
,
data_format
,
use_addto
,
workspace_size_MB
,
exhaustive_search
]
kernel
:
func
:
depthwise_conv2d
param
:
[
x
,
filter
,
strides
,
paddings
,
padding_algorithm
,
groups
,
dilations
,
data_format
,
use_addto
,
workspace_size_MB
,
exhaustive_search
,
fuse_relu
]
use_gpudnn
:
use_gpudnn
backward
:
depthwise_conv2d_grad
# infer_meta :
# func : ConvTransposeInferMeta
# prams: [x, filter, strides, paddings, padding_algorithm, groups, dilations, data_format, use_addto, workspace_size_MB, exhaustive_search]
# kernel :
# func : depthwise_conv2d
-
api
:
depthwise_conv2d_transpose
args
:
(Tensor x, Tensor filter, int[] strides, int[] paddings, int[] output_padding, int[] output_size, str padding_algorithm, int groups, int[] dilations, str data_format)
...
...
python/paddle/utils/code_gen/backward.yaml
浏览文件 @
f551d9fe
...
...
@@ -495,22 +495,27 @@
optional
:
mask
-
backward_api
:
depthwise_conv2d_grad
forward
:
depthwise_conv2d (Tensor input, Tensor filter, int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu) -> Tensor(out)
args
:
(Tensor input, Tensor filter, Tensor out_grad,
int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu
)
forward
:
depthwise_conv2d (Tensor input, Tensor filter, int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu
, bool use_gpudnn
) -> Tensor(out)
args
:
(Tensor input, Tensor filter, Tensor out_grad,
int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu, bool use_gpudnn
)
output
:
Tensor(input_grad), Tensor(filter_grad)
invoke
:
conv2d_grad_impl(input, filter, out_grad, strides, paddings, paddding_algorithm, groups, dilations, data_format, use_addto, workspace_size_MB, exhaustive_search, input_grad, filter_grad)
infer_meta
:
func
:
GeneralBinaryGradInferMeta
param
:
[
input
,
filter
]
kernel
:
func
:
depthwise_conv2d_grad
param
:
[
input
,
filter
,
out_grad
,
strides
,
paddings
,
paddding_algorithm
,
groups
,
dilations
,
data_format
,
use_addto
,
workspace_size_MB
,
exhaustive_search
,
fuse_relu
]
use_gpudnn
:
use_gpudnn
backward
:
depthwise_conv2d_grad_grad
-
backward_api
:
depthwise_conv2d_grad_grad
forward
:
depthwise_conv2d_grad (Tensor input, Tensor filter, Tensor grad_out,
int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu
) -> Tensor(grad_input), Tensor(grad_filter)
args
:
(Tensor input, Tensor filter, Tensor grad_out, Tensor grad_input_grad, Tensor grad_filter_grad, int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search)
forward
:
depthwise_conv2d_grad (Tensor input, Tensor filter, Tensor grad_out,
int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search, bool fuse_relu, bool use_gpudnn
) -> Tensor(grad_input), Tensor(grad_filter)
args
:
(Tensor input, Tensor filter, Tensor grad_out, Tensor grad_input_grad, Tensor grad_filter_grad, int[] strides, int[] paddings, str paddding_algorithm, int groups, int[] dilations, str data_format, bool use_addto, int workspace_size_MB, bool exhaustive_search
, bool fuse_relu
)
output
:
Tensor(input_grad), Tensor(filter_grad), Tensor(grad_out_grad)
infer_meta
:
func
:
GeneralTernaryGradInferMeta
param
:
[
input
,
filter
,
grad_out
]
kernel
:
func
:
conv2d_grad_grad
use_gpudnn
:
true
func
:
depthwise_conv2d_grad_grad
optional
:
grad_input_grad, grad_filter_grad
-
backward_api
:
depthwise_conv2d_transpose_grad
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录