Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c174aa22
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
未验证
提交
c174aa22
编写于
5月 19, 2023
作者:
G
Galaxy1458
提交者:
GitHub
5月 19, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test,test=develop (#53839)
上级
6cb53e91
变更
19
显示空白变更内容
内联
并排
Showing
19 changed file
with
45 addition
and
43 deletion
+45
-43
paddle/phi/kernels/impl/lu_unpack_grad_kernel_impl.h
paddle/phi/kernels/impl/lu_unpack_grad_kernel_impl.h
+7
-7
paddle/phi/kernels/impl/poisson_grad_kernel_impl.h
paddle/phi/kernels/impl/poisson_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/pool_grad_kernel_impl.h
paddle/phi/kernels/impl/pool_grad_kernel_impl.h
+3
-3
paddle/phi/kernels/impl/pool_kernel_impl.h
paddle/phi/kernels/impl/pool_kernel_impl.h
+2
-2
paddle/phi/kernels/impl/qr_grad_kernel_impl.h
paddle/phi/kernels/impl/qr_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/renorm_impl.h
paddle/phi/kernels/impl/renorm_impl.h
+8
-7
paddle/phi/kernels/impl/rmsprop_kernel_impl.h
paddle/phi/kernels/impl/rmsprop_kernel_impl.h
+2
-1
paddle/phi/kernels/impl/sequence_pool_grad_kernel_impl.h
paddle/phi/kernels/impl/sequence_pool_grad_kernel_impl.h
+3
-3
paddle/phi/kernels/impl/svd_grad_kernel_impl.h
paddle/phi/kernels/impl/svd_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/unfold_grad_kernel_impl.h
paddle/phi/kernels/impl/unfold_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/warpctc_grad_kernel_impl.h
paddle/phi/kernels/impl/warpctc_grad_kernel_impl.h
+2
-2
paddle/phi/kernels/impl/warpctc_kernel_impl.h
paddle/phi/kernels/impl/warpctc_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/warprnnt_grad_kernel_impl.h
paddle/phi/kernels/impl/warprnnt_grad_kernel_impl.h
+4
-4
paddle/phi/kernels/legacy/cpu/one_hot_kernel.cc
paddle/phi/kernels/legacy/cpu/one_hot_kernel.cc
+1
-1
paddle/phi/kernels/legacy/cpu/randint_kernel.cc
paddle/phi/kernels/legacy/cpu/randint_kernel.cc
+1
-1
paddle/phi/kernels/onednn/activation_grad_kernel.cc
paddle/phi/kernels/onednn/activation_grad_kernel.cc
+1
-1
paddle/phi/kernels/onednn/conv_transpose_kernel.cc
paddle/phi/kernels/onednn/conv_transpose_kernel.cc
+3
-3
paddle/phi/kernels/onednn/expand_grad_kernel.cc
paddle/phi/kernels/onednn/expand_grad_kernel.cc
+2
-2
paddle/phi/kernels/onednn/matmul_grad_kernel.cc
paddle/phi/kernels/onednn/matmul_grad_kernel.cc
+1
-1
未找到文件。
paddle/phi/kernels/impl/lu_unpack_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -20,15 +20,15 @@ namespace phi {
...
@@ -20,15 +20,15 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
LUUnpackGradKernel
(
const
Context
&
dev_ctx
,
void
LUUnpackGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
pivots
,
const
DenseTensor
&
pivots
UNUSED
,
const
DenseTensor
&
l
,
const
DenseTensor
&
l
UNUSED
,
const
DenseTensor
&
u
,
const
DenseTensor
&
u
UNUSED
,
const
DenseTensor
&
pmat
,
const
DenseTensor
&
pmat
UNUSED
,
const
DenseTensor
&
l_grad
,
const
DenseTensor
&
l_grad
,
const
DenseTensor
&
u_grad
,
const
DenseTensor
&
u_grad
,
bool
unpack_ludata
,
bool
unpack_ludata
UNUSED
,
bool
unpack_pivots
,
bool
unpack_pivots
UNUSED
,
DenseTensor
*
x_grad
)
{
DenseTensor
*
x_grad
)
{
dev_ctx
.
template
Alloc
<
T
>(
x_grad
);
dev_ctx
.
template
Alloc
<
T
>(
x_grad
);
...
...
paddle/phi/kernels/impl/poisson_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -21,7 +21,7 @@ namespace phi {
...
@@ -21,7 +21,7 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
PoissonGradKernel
(
const
Context
&
ctx
,
void
PoissonGradKernel
(
const
Context
&
ctx
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
UNUSED
,
DenseTensor
*
x_grad
)
{
DenseTensor
*
x_grad
)
{
ctx
.
template
Alloc
<
T
>(
x_grad
);
ctx
.
template
Alloc
<
T
>(
x_grad
);
phi
::
funcs
::
SetConstant
<
Context
,
T
>
functor
;
phi
::
funcs
::
SetConstant
<
Context
,
T
>
functor
;
...
...
paddle/phi/kernels/impl/pool_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -142,7 +142,7 @@ void PoolGradRawKernel(const Context& ctx,
...
@@ -142,7 +142,7 @@ void PoolGradRawKernel(const Context& ctx,
template
<
typename
Context
,
typename
T1
,
typename
T2
=
int
>
template
<
typename
Context
,
typename
T1
,
typename
T2
=
int
>
void
MaxPoolWithIndexGradRawKernel
(
const
Context
&
ctx
,
void
MaxPoolWithIndexGradRawKernel
(
const
Context
&
ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
mask
,
const
DenseTensor
&
mask
,
const
DenseTensor
&
dout
,
const
DenseTensor
&
dout
,
const
std
::
vector
<
int
>&
kernel_size
,
const
std
::
vector
<
int
>&
kernel_size
,
...
@@ -192,7 +192,7 @@ void Pool2dGradKernel(const Context& ctx,
...
@@ -192,7 +192,7 @@ void Pool2dGradKernel(const Context& ctx,
const
IntArray
&
kernel_size
,
const
IntArray
&
kernel_size
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
paddings
,
bool
ceil_mode
,
bool
ceil_mode
UNUSED
,
bool
exclusive
,
bool
exclusive
,
const
std
::
string
&
data_format
,
const
std
::
string
&
data_format
,
const
std
::
string
&
pooling_type
,
const
std
::
string
&
pooling_type
,
...
@@ -283,7 +283,7 @@ void Pool3dGradKernel(const Context& ctx,
...
@@ -283,7 +283,7 @@ void Pool3dGradKernel(const Context& ctx,
const
std
::
vector
<
int
>&
kernel_size
,
const
std
::
vector
<
int
>&
kernel_size
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
paddings
,
bool
ceil_mode
,
bool
ceil_mode
UNUSED
,
bool
exclusive
,
bool
exclusive
,
const
std
::
string
&
data_format
,
const
std
::
string
&
data_format
,
const
std
::
string
&
pooling_type
,
const
std
::
string
&
pooling_type
,
...
...
paddle/phi/kernels/impl/pool_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -228,7 +228,7 @@ void Pool2dKernel(const Context& ctx,
...
@@ -228,7 +228,7 @@ void Pool2dKernel(const Context& ctx,
const
IntArray
&
kernel_size
,
const
IntArray
&
kernel_size
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
paddings
,
bool
ceil_mode
,
bool
ceil_mode
UNUSED
,
bool
exclusive
,
bool
exclusive
,
const
std
::
string
&
data_format
,
const
std
::
string
&
data_format
,
const
std
::
string
&
pooling_type
,
const
std
::
string
&
pooling_type
,
...
@@ -279,7 +279,7 @@ void Pool3dKernel(const Context& ctx,
...
@@ -279,7 +279,7 @@ void Pool3dKernel(const Context& ctx,
const
std
::
vector
<
int
>&
kernel_size
,
const
std
::
vector
<
int
>&
kernel_size
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
paddings
,
bool
ceil_mode
,
bool
ceil_mode
UNUSED
,
bool
exclusive
,
bool
exclusive
,
const
std
::
string
&
data_format
,
const
std
::
string
&
data_format
,
const
std
::
string
&
pooling_type
,
const
std
::
string
&
pooling_type
,
...
...
paddle/phi/kernels/impl/qr_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -88,7 +88,7 @@ void QrGradKernel(const Context& ctx,
...
@@ -88,7 +88,7 @@ void QrGradKernel(const Context& ctx,
auto
m_gt_n_case
=
[](
const
Context
&
ctx
,
auto
m_gt_n_case
=
[](
const
Context
&
ctx
,
const
DenseTensor
&
dQ
,
const
DenseTensor
&
dQ
,
const
DenseTensor
&
dR
,
const
DenseTensor
&
dR
,
const
DenseTensor
&
A
,
const
DenseTensor
&
A
UNUSED
,
const
DenseTensor
&
Q
,
const
DenseTensor
&
Q
,
const
DenseTensor
&
R
)
->
DenseTensor
{
const
DenseTensor
&
R
)
->
DenseTensor
{
// Hai-Jun Liao, Jin-Guo Liu, Lei Wang, Tao Xiang (2019). Differentiable
// Hai-Jun Liao, Jin-Guo Liu, Lei Wang, Tao Xiang (2019). Differentiable
...
...
paddle/phi/kernels/impl/renorm_impl.h
浏览文件 @
c174aa22
...
@@ -32,14 +32,14 @@ namespace phi {
...
@@ -32,14 +32,14 @@ namespace phi {
namespace
funcs
{
namespace
funcs
{
template
<
typename
T
>
template
<
typename
T
>
void
RenormFunc
(
const
phi
::
CPUContext
&
ctx
,
void
RenormFunc
(
const
phi
::
CPUContext
&
ctx
UNUSED
,
const
T
*
x_data
,
const
T
*
x_data
,
T
*
out_data
,
T
*
out_data
,
float
p
,
float
p
,
int
dim
,
int
dim
,
float
max_norm
,
float
max_norm
,
int64_t
dimension_each
,
int64_t
dimension_each
,
phi
::
DDim
&
input_dims
,
const
phi
::
DDim
&
input_dims
,
int64_t
numel
)
{
int64_t
numel
)
{
auto
dim_size
=
input_dims
.
size
();
auto
dim_size
=
input_dims
.
size
();
int64_t
dim_divisor
=
1
;
int64_t
dim_divisor
=
1
;
...
@@ -83,7 +83,7 @@ void RenormFunc(const phi::CPUContext& ctx,
...
@@ -83,7 +83,7 @@ void RenormFunc(const phi::CPUContext& ctx,
}
}
template
<
typename
T
>
template
<
typename
T
>
void
RenormGradFunc
(
const
phi
::
CPUContext
&
ctx
,
void
RenormGradFunc
(
const
phi
::
CPUContext
&
ctx
UNUSED
,
const
T
*
x_data
,
const
T
*
x_data
,
const
T
*
dout_data
,
const
T
*
dout_data
,
T
*
dx_data
,
T
*
dx_data
,
...
@@ -91,7 +91,7 @@ void RenormGradFunc(const phi::CPUContext& ctx,
...
@@ -91,7 +91,7 @@ void RenormGradFunc(const phi::CPUContext& ctx,
int
dim
,
int
dim
,
float
max_norm
,
float
max_norm
,
int64_t
dimension_each
,
int64_t
dimension_each
,
phi
::
DDim
&
input_dims
,
const
phi
::
DDim
&
input_dims
,
int64_t
numel
)
{
int64_t
numel
)
{
auto
dim_size
=
input_dims
.
size
();
auto
dim_size
=
input_dims
.
size
();
int64_t
dim_divisor
=
1
;
int64_t
dim_divisor
=
1
;
...
@@ -116,9 +116,10 @@ void RenormGradFunc(const phi::CPUContext& ctx,
...
@@ -116,9 +116,10 @@ void RenormGradFunc(const phi::CPUContext& ctx,
dim_power_sum
[
i
]
=
dim_power_sum
[
i
]
=
std
::
pow
(
dim_value
[
i
],
(
T
)(
-
1.0
-
1.0
/
p
))
*
-
1
*
max_norm
;
std
::
pow
(
dim_value
[
i
],
(
T
)(
-
1.0
-
1.0
/
p
))
*
-
1
*
max_norm
;
dim_value
[
i
]
=
max_norm
/
temp
;
dim_value
[
i
]
=
max_norm
/
temp
;
}
else
}
else
{
dim_value
[
i
]
=
1.0
;
dim_value
[
i
]
=
1.0
;
}
}
}
index
=
dim_index
=
0
;
index
=
dim_index
=
0
;
for
(
int64_t
i
=
0
;
i
<
numel
;
i
++
)
{
for
(
int64_t
i
=
0
;
i
<
numel
;
i
++
)
{
dx_data
[
i
]
=
dim_value
[
dim_index
]
*
dout_data
[
i
];
dx_data
[
i
]
=
dim_value
[
dim_index
]
*
dout_data
[
i
];
...
@@ -271,7 +272,7 @@ void RenormFunc(const phi::GPUContext& ctx,
...
@@ -271,7 +272,7 @@ void RenormFunc(const phi::GPUContext& ctx,
int
dim
,
int
dim
,
float
max_norm
,
float
max_norm
,
int64_t
dimension_each
,
int64_t
dimension_each
,
phi
::
DDim
&
input_dims
,
const
phi
::
DDim
&
input_dims
,
int64_t
numel
)
{
int64_t
numel
)
{
auto
dim_size
=
input_dims
.
size
();
auto
dim_size
=
input_dims
.
size
();
DenseTensor
pow_value
,
dim_value
;
DenseTensor
pow_value
,
dim_value
;
...
@@ -307,7 +308,7 @@ void RenormGradFunc(const phi::GPUContext& ctx,
...
@@ -307,7 +308,7 @@ void RenormGradFunc(const phi::GPUContext& ctx,
int
dim
,
int
dim
,
float
max_norm
,
float
max_norm
,
int64_t
dimension_each
,
int64_t
dimension_each
,
phi
::
DDim
&
input_dims
,
const
phi
::
DDim
&
input_dims
,
int64_t
numel
)
{
int64_t
numel
)
{
auto
dim_size
=
input_dims
.
size
();
auto
dim_size
=
input_dims
.
size
();
int64_t
dim_divisor
=
1
,
pre_mul
=
1
;
int64_t
dim_divisor
=
1
,
pre_mul
=
1
;
...
...
paddle/phi/kernels/impl/rmsprop_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -225,7 +225,8 @@ void RmspropSparseKernel(const Context &ctx,
...
@@ -225,7 +225,8 @@ void RmspropSparseKernel(const Context &ctx,
const
DenseTensor
&
moment
,
const
DenseTensor
&
moment
,
const
DenseTensor
&
learning_rate
,
const
DenseTensor
&
learning_rate
,
const
paddle
::
optional
<
DenseTensor
>
&
mean_grad_opt
,
const
paddle
::
optional
<
DenseTensor
>
&
mean_grad_opt
,
const
paddle
::
optional
<
DenseTensor
>
&
master_param
,
const
paddle
::
optional
<
DenseTensor
>
&
master_param
UNUSED
,
float
epsilon_t
,
float
epsilon_t
,
float
decay_t
,
float
decay_t
,
float
momentum_t
,
float
momentum_t
,
...
...
paddle/phi/kernels/impl/sequence_pool_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -20,12 +20,12 @@ namespace phi {
...
@@ -20,12 +20,12 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
SequencePoolGradKernel
(
const
Context
&
dev_ctx
,
void
SequencePoolGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
paddle
::
optional
<
DenseTensor
>&
max_index
,
const
paddle
::
optional
<
DenseTensor
>&
max_index
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
bool
is_test
,
bool
is_test
UNUSED
,
const
std
::
string
&
pooltype
,
const
std
::
string
&
pooltype
,
float
pad_value
,
float
pad_value
UNUSED
,
DenseTensor
*
x_grad
)
{
DenseTensor
*
x_grad
)
{
const
phi
::
DenseTensor
*
index
=
nullptr
;
const
phi
::
DenseTensor
*
index
=
nullptr
;
if
(
pooltype
==
"MAX"
)
{
if
(
pooltype
==
"MAX"
)
{
...
...
paddle/phi/kernels/impl/svd_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -67,7 +67,7 @@ static DenseTensor Unsqueeze(const DenseTensor& x, int axis = 0) {
...
@@ -67,7 +67,7 @@ static DenseTensor Unsqueeze(const DenseTensor& x, int axis = 0) {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
SvdGradKernel
(
const
Context
&
dev_ctx
,
void
SvdGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
u
,
const
DenseTensor
&
u
,
const
DenseTensor
&
vh
,
const
DenseTensor
&
vh
,
const
DenseTensor
&
s
,
const
DenseTensor
&
s
,
...
...
paddle/phi/kernels/impl/unfold_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -25,7 +25,7 @@ namespace phi {
...
@@ -25,7 +25,7 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
UnfoldGradKernel
(
const
Context
&
ctx
,
void
UnfoldGradKernel
(
const
Context
&
ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
const
std
::
vector
<
int
>&
kernel_sizes
,
const
std
::
vector
<
int
>&
kernel_sizes
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
...
...
paddle/phi/kernels/impl/warpctc_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -29,11 +29,11 @@ namespace phi {
...
@@ -29,11 +29,11 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
WarpctcGradKernel
(
const
Context
&
dev_ctx
,
void
WarpctcGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
logits
,
const
DenseTensor
&
logits
UNUSED
,
const
paddle
::
optional
<
DenseTensor
>&
logits_length
,
const
paddle
::
optional
<
DenseTensor
>&
logits_length
,
const
DenseTensor
&
warpctcgrad
,
const
DenseTensor
&
warpctcgrad
,
const
DenseTensor
&
loss_grad
,
const
DenseTensor
&
loss_grad
,
int
blank
,
int
blank
UNUSED
,
bool
norm_by_times
,
bool
norm_by_times
,
DenseTensor
*
logits_grad
)
{
DenseTensor
*
logits_grad
)
{
dev_ctx
.
template
Alloc
<
T
>(
logits_grad
);
dev_ctx
.
template
Alloc
<
T
>(
logits_grad
);
...
...
paddle/phi/kernels/impl/warpctc_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -233,7 +233,7 @@ void WarpctcKernel(const Context& dev_ctx,
...
@@ -233,7 +233,7 @@ void WarpctcKernel(const Context& dev_ctx,
const
paddle
::
optional
<
DenseTensor
>&
logits_length
,
const
paddle
::
optional
<
DenseTensor
>&
logits_length
,
const
paddle
::
optional
<
DenseTensor
>&
labels_length
,
const
paddle
::
optional
<
DenseTensor
>&
labels_length
,
int
blank
,
int
blank
,
bool
norm_by_times
,
bool
norm_by_times
UNUSED
,
DenseTensor
*
loss
,
DenseTensor
*
loss
,
DenseTensor
*
warpctcgrad
)
{
DenseTensor
*
warpctcgrad
)
{
size_t
num_sequences
,
sequence_width
,
max_sequence_length
;
size_t
num_sequences
,
sequence_width
,
max_sequence_length
;
...
...
paddle/phi/kernels/impl/warprnnt_grad_kernel_impl.h
浏览文件 @
c174aa22
...
@@ -25,12 +25,12 @@ namespace phi {
...
@@ -25,12 +25,12 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
WarprnntGradKernel
(
const
Context
&
dev_ctx
,
void
WarprnntGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
input
,
const
DenseTensor
&
input
UNUSED
,
const
DenseTensor
&
input_lengths
,
const
DenseTensor
&
input_lengths
UNUSED
,
const
DenseTensor
&
warprnntgrad
,
const
DenseTensor
&
warprnntgrad
,
const
DenseTensor
&
loss_grad
,
const
DenseTensor
&
loss_grad
,
int
blank
,
int
blank
UNUSED
,
float
fastemit_lambda
,
float
fastemit_lambda
UNUSED
,
DenseTensor
*
input_grad
)
{
DenseTensor
*
input_grad
)
{
dev_ctx
.
template
Alloc
<
T
>(
input_grad
);
dev_ctx
.
template
Alloc
<
T
>(
input_grad
);
...
...
paddle/phi/kernels/legacy/cpu/one_hot_kernel.cc
浏览文件 @
c174aa22
...
@@ -67,7 +67,7 @@ void OneHotRawKernel(const Context& dev_ctx,
...
@@ -67,7 +67,7 @@ void OneHotRawKernel(const Context& dev_ctx,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
,
const
Scalar
&
depth
,
const
Scalar
&
depth
,
DataType
dtype
,
DataType
dtype
,
bool
allow_out_of_range
,
bool
allow_out_of_range
UNUSED
,
DenseTensor
*
out
)
{
DenseTensor
*
out
)
{
auto
depth_v
=
depth
.
to
<
int
>
();
auto
depth_v
=
depth
.
to
<
int
>
();
auto
out_dims
=
out
->
dims
();
auto
out_dims
=
out
->
dims
();
...
...
paddle/phi/kernels/legacy/cpu/randint_kernel.cc
浏览文件 @
c174aa22
...
@@ -26,7 +26,7 @@ void RandintWithSeedKernel(const Context& dev_ctx,
...
@@ -26,7 +26,7 @@ void RandintWithSeedKernel(const Context& dev_ctx,
int
low
,
int
low
,
int
high
,
int
high
,
const
IntArray
&
shape
,
const
IntArray
&
shape
,
DataType
dtype
,
DataType
dtype
UNUSED
,
int
seed
,
int
seed
,
DenseTensor
*
out
)
{
DenseTensor
*
out
)
{
out
->
Resize
(
phi
::
make_ddim
(
shape
.
GetData
()));
out
->
Resize
(
phi
::
make_ddim
(
shape
.
GetData
()));
...
...
paddle/phi/kernels/onednn/activation_grad_kernel.cc
浏览文件 @
c174aa22
...
@@ -217,7 +217,7 @@ void SwishGradKernel(const Context& dev_ctx,
...
@@ -217,7 +217,7 @@ void SwishGradKernel(const Context& dev_ctx,
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
EluGradKernel
(
const
Context
&
dev_ctx
,
void
EluGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
out
,
const
DenseTensor
&
out
,
const
DenseTensor
&
dout
,
const
DenseTensor
&
dout
,
float
alpha
,
float
alpha
,
...
...
paddle/phi/kernels/onednn/conv_transpose_kernel.cc
浏览文件 @
c174aa22
...
@@ -372,12 +372,12 @@ void Conv2dTransposeKernel(const Context& dev_ctx,
...
@@ -372,12 +372,12 @@ void Conv2dTransposeKernel(const Context& dev_ctx,
const
DenseTensor
&
filter
,
const
DenseTensor
&
filter
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
output_padding
,
const
std
::
vector
<
int
>&
output_padding
UNUSED
,
const
IntArray
&
output_size
,
const
IntArray
&
output_size
UNUSED
,
const
std
::
string
&
padding_algorithm
,
const
std
::
string
&
padding_algorithm
,
int
groups
,
int
groups
,
const
std
::
vector
<
int
>&
dilations
,
const
std
::
vector
<
int
>&
dilations
,
const
std
::
string
&
data_format
,
const
std
::
string
&
data_format
UNUSED
,
DenseTensor
*
out
)
{
DenseTensor
*
out
)
{
PADDLE_ENFORCE_EQ
(
dev_ctx
.
GetPlace
().
GetType
(),
PADDLE_ENFORCE_EQ
(
dev_ctx
.
GetPlace
().
GetType
(),
AllocationType
::
CPU
,
AllocationType
::
CPU
,
...
...
paddle/phi/kernels/onednn/expand_grad_kernel.cc
浏览文件 @
c174aa22
...
@@ -20,9 +20,9 @@
...
@@ -20,9 +20,9 @@
namespace
phi
{
namespace
phi
{
template
<
typename
T
,
typename
Context
>
template
<
typename
T
,
typename
Context
>
void
ExpandGradKernel
(
const
Context
&
dev_ctx
,
void
ExpandGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
out_grad
,
const
DenseTensor
&
out_grad
,
const
IntArray
&
shape
,
const
IntArray
&
shape
UNUSED
,
DenseTensor
*
in_grad
)
{
DenseTensor
*
in_grad
)
{
const
auto
&
onednn_engine
=
dev_ctx
.
GetEngine
();
const
auto
&
onednn_engine
=
dev_ctx
.
GetEngine
();
...
...
paddle/phi/kernels/onednn/matmul_grad_kernel.cc
浏览文件 @
c174aa22
...
@@ -84,7 +84,7 @@ template <typename T>
...
@@ -84,7 +84,7 @@ template <typename T>
void
ReduceSumForMatmulGradOutput
(
const
OneDNNContext
&
dev_ctx
,
void
ReduceSumForMatmulGradOutput
(
const
OneDNNContext
&
dev_ctx
,
const
DenseTensor
*
dx_tmp
,
const
DenseTensor
*
dx_tmp
,
DenseTensor
*
dx
,
DenseTensor
*
dx
,
const
std
::
vector
<
int64_t
>
&
dx_dims
,
const
std
::
vector
<
int64_t
>
&
dx_dims
UNUSED
,
const
std
::
vector
<
int64_t
>
&
x_dims
)
{
const
std
::
vector
<
int64_t
>
&
x_dims
)
{
funcs
::
ReductionOneDNNHandler
<
T
>
handler
(
dnnl
::
algorithm
::
reduction_sum
,
funcs
::
ReductionOneDNNHandler
<
T
>
handler
(
dnnl
::
algorithm
::
reduction_sum
,
0.0
f
,
0.0
f
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录