Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c1f4005a
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c1f4005a
编写于
5月 19, 2023
作者:
G
Galaxy1458
提交者:
GitHub
5月 19, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test,test=develop (#53843)
上级
c174aa22
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
48 addition
and
47 deletion
+48
-47
paddle/phi/kernels/funcs/viterbi_decode_functor.h
paddle/phi/kernels/funcs/viterbi_decode_functor.h
+2
-2
paddle/phi/kernels/funcs/vol2col.cc
paddle/phi/kernels/funcs/vol2col.cc
+2
-2
paddle/phi/kernels/fusion/onednn/fused_softplus_kernel.cc
paddle/phi/kernels/fusion/onednn/fused_softplus_kernel.cc
+1
-1
paddle/phi/kernels/gpu/rnn_grad_kernel.cu.cc
paddle/phi/kernels/gpu/rnn_grad_kernel.cu.cc
+1
-1
paddle/phi/kernels/gpu/rnn_kernel.cu.cc
paddle/phi/kernels/gpu/rnn_kernel.cu.cc
+1
-1
paddle/phi/kernels/impl/adagrad_kernel_impl.h
paddle/phi/kernels/impl/adagrad_kernel_impl.h
+4
-3
paddle/phi/kernels/impl/adamax_kernel_impl.h
paddle/phi/kernels/impl/adamax_kernel_impl.h
+3
-3
paddle/phi/kernels/impl/amp_kernel_impl.h
paddle/phi/kernels/impl/amp_kernel_impl.h
+4
-4
paddle/phi/kernels/impl/complex_grad_kernel_impl.h
paddle/phi/kernels/impl/complex_grad_kernel_impl.h
+6
-6
paddle/phi/kernels/impl/conv_transpose_grad_kernel_impl.h
paddle/phi/kernels/impl/conv_transpose_grad_kernel_impl.h
+4
-4
paddle/phi/kernels/impl/conv_transpose_kernel_impl.h
paddle/phi/kernels/impl/conv_transpose_kernel_impl.h
+4
-4
paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h
paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h
+7
-7
paddle/phi/kernels/impl/fft_grad_kernel_impl.h
paddle/phi/kernels/impl/fft_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/fft_kernel_impl.h
paddle/phi/kernels/impl/fft_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/fold_grad_kernel_impl.h
paddle/phi/kernels/impl/fold_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h
paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/lerp_grad_kernel_impl.h
paddle/phi/kernels/impl/lerp_grad_kernel_impl.h
+3
-3
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
+1
-1
paddle/phi/kernels/impl/lu_grad_kernel_impl.h
paddle/phi/kernels/impl/lu_grad_kernel_impl.h
+1
-1
未找到文件。
paddle/phi/kernels/funcs/viterbi_decode_functor.h
浏览文件 @
c1f4005a
...
...
@@ -53,12 +53,12 @@ template <bool is_multi_threads>
struct
GetInputIndex
{
void
operator
()(
const
std
::
vector
<
int
>&
lhs_dims
,
const
std
::
vector
<
int
>&
rhs_dims
,
const
std
::
vector
<
int
>&
output_dims
,
const
std
::
vector
<
int
>&
output_dims
UNUSED
,
const
std
::
vector
<
int
>&
lhs_strides
,
const
std
::
vector
<
int
>&
rhs_strides
,
const
std
::
vector
<
int
>&
output_strides
,
int
output_idx
,
int
*
index_array
,
int
*
index_array
UNUSED
,
int
*
lhs_idx
,
int
*
rhs_idx
)
{
int
out_dims_size
=
output_strides
.
size
();
...
...
paddle/phi/kernels/funcs/vol2col.cc
浏览文件 @
c1f4005a
...
...
@@ -28,7 +28,7 @@ namespace funcs {
template
<
class
T
>
class
Vol2ColFunctor
<
phi
::
CPUContext
,
T
>
{
public:
void
operator
()(
const
phi
::
CPUContext
&
context
,
void
operator
()(
const
phi
::
CPUContext
&
context
UNUSED
,
const
phi
::
DenseTensor
&
vol
,
const
std
::
vector
<
int
>&
dilations
,
const
std
::
vector
<
int
>&
strides
,
...
...
@@ -154,7 +154,7 @@ class Vol2ColFunctor<phi::CPUContext, T> {
template
<
class
T
>
class
Col2VolFunctor
<
phi
::
CPUContext
,
T
>
{
public:
void
operator
()(
const
phi
::
CPUContext
&
context
,
void
operator
()(
const
phi
::
CPUContext
&
context
UNUSED
,
const
phi
::
DenseTensor
&
col
,
const
std
::
vector
<
int
>&
dilations
,
const
std
::
vector
<
int
>&
strides
,
...
...
paddle/phi/kernels/fusion/onednn/fused_softplus_kernel.cc
浏览文件 @
c1f4005a
...
...
@@ -24,7 +24,7 @@ template <typename T, typename Context>
void
FusedSoftplusKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
float
beta
,
float
threshold
,
float
threshold
UNUSED
,
const
std
::
string
&
fuse_activation
,
const
float
fuse_alpha
,
const
float
fuse_beta
,
...
...
paddle/phi/kernels/gpu/rnn_grad_kernel.cu.cc
浏览文件 @
c1f4005a
...
...
@@ -86,7 +86,7 @@ void RnnGradKernel(const Context &dev_ctx,
const
std
::
vector
<
const
DenseTensor
*>
&
state_grad
,
float
dropout_prob
,
bool
is_bidirec
,
int
input_size
,
int
input_size
UNUSED
,
int
hidden_size
,
int
num_layers
,
const
std
::
string
&
mode
,
...
...
paddle/phi/kernels/gpu/rnn_kernel.cu.cc
浏览文件 @
c1f4005a
...
...
@@ -134,7 +134,7 @@ void RnnKernel(const Context &dev_ctx,
const
paddle
::
optional
<
DenseTensor
>
&
sequence_length
,
float
dropout_prob
,
bool
is_bidirec
,
int
input_size
,
int
input_size
UNUSED
,
int
hidden_size
,
int
num_layers
,
const
std
::
string
&
mode
,
...
...
paddle/phi/kernels/impl/adagrad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -91,12 +91,13 @@ void AdagradSparseKernel(const Context& ctx,
const
SelectedRows
&
grad_t
,
const
DenseTensor
&
moment_t
,
const
DenseTensor
&
learning_rate
,
const
paddle
::
optional
<
DenseTensor
>&
master_param
,
const
paddle
::
optional
<
DenseTensor
>&
master_param
UNUSED
,
float
epsilon_t
,
bool
multi_precision
,
bool
multi_precision
UNUSED
,
DenseTensor
*
param_out
,
DenseTensor
*
moment_out
,
DenseTensor
*
master_param_outs
)
{
DenseTensor
*
master_param_outs
UNUSED
)
{
auto
*
param_out_tensor
=
param_out
;
auto
*
moment_out_tensor
=
moment_out
;
...
...
paddle/phi/kernels/impl/adamax_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -28,15 +28,15 @@ void AdamaxKernel(const Context& dev_ctx,
const
DenseTensor
&
moment
,
const
DenseTensor
&
inf_norm
,
const
DenseTensor
&
beta1_pow
,
const
paddle
::
optional
<
DenseTensor
>&
master_param
,
const
paddle
::
optional
<
DenseTensor
>&
master_param
UNUSED
,
float
beta1
,
float
beta2
,
float
epsilon
,
bool
multi_precision
,
bool
multi_precision
UNUSED
,
DenseTensor
*
param_out
,
DenseTensor
*
moment_out
,
DenseTensor
*
inf_norm_out
,
DenseTensor
*
master_param_outs
)
{
DenseTensor
*
master_param_outs
UNUSED
)
{
dev_ctx
.
template
Alloc
<
T
>(
param_out
);
dev_ctx
.
template
Alloc
<
T
>(
moment_out
);
dev_ctx
.
template
Alloc
<
T
>(
inf_norm_out
);
...
...
paddle/phi/kernels/impl/amp_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -76,10 +76,10 @@ inline HOSTDEVICE void Update(const FoundInfFlagT found_inf_data,
template
<
typename
Context
,
typename
T
>
class
LazyZeros
{
public:
void
operator
()(
const
DeviceContext
&
dev_ctx
,
const
bool
*
found_inf_data
,
const
std
::
vector
<
const
DenseTensor
*>&
xs
,
const
std
::
vector
<
DenseTensor
*>&
outs
)
const
{}
void
operator
()(
const
DeviceContext
&
dev_ctx
UNUSED
,
const
bool
*
found_inf_data
UNUSED
,
const
std
::
vector
<
const
DenseTensor
*>&
xs
UNUSED
,
const
std
::
vector
<
DenseTensor
*>&
outs
UNUSED
)
const
{}
};
template
<
typename
Context
,
typename
T
,
bool
IsFoundInfOnCPU
>
...
...
paddle/phi/kernels/impl/complex_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -50,9 +50,9 @@ void ImagGradKernel(const Context& dev_ctx,
template
<
typename
T
>
struct
ComplexGradForRealFunctor
{
inline
HOSTDEVICE
T
operator
()(
const
T
x
,
const
T
y
,
const
phi
::
dtype
::
complex
<
T
>
out
,
inline
HOSTDEVICE
T
operator
()(
const
T
x
UNUSED
,
const
T
y
UNUSED
,
const
phi
::
dtype
::
complex
<
T
>
out
UNUSED
,
const
phi
::
dtype
::
complex
<
T
>
dout
)
{
return
dout
.
real
;
}
...
...
@@ -60,9 +60,9 @@ struct ComplexGradForRealFunctor {
template
<
typename
T
>
struct
ComplexGradForImagFunctor
{
inline
HOSTDEVICE
T
operator
()(
const
T
x
,
const
T
y
,
const
phi
::
dtype
::
complex
<
T
>
out
,
inline
HOSTDEVICE
T
operator
()(
const
T
x
UNUSED
,
const
T
y
UNUSED
,
const
phi
::
dtype
::
complex
<
T
>
out
UNUSED
,
const
phi
::
dtype
::
complex
<
T
>
dout
)
{
return
dout
.
imag
;
}
...
...
paddle/phi/kernels/impl/conv_transpose_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -306,8 +306,8 @@ void Conv2dTransposeGradKernel(const Context& ctx,
const
DenseTensor
&
dout
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
output_padding
,
const
IntArray
&
output_size
,
const
std
::
vector
<
int
>&
output_padding
UNUSED
,
const
IntArray
&
output_size
UNUSED
,
const
std
::
string
&
padding_algorithm
,
int
groups
,
const
std
::
vector
<
int
>&
dilations
,
...
...
@@ -335,8 +335,8 @@ void Conv3dTransposeGradKernel(const Context& ctx,
const
DenseTensor
&
dout
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
output_padding
,
const
std
::
vector
<
int
>&
output_size
,
const
std
::
vector
<
int
>&
output_padding
UNUSED
,
const
std
::
vector
<
int
>&
output_size
UNUSED
,
const
std
::
string
&
padding_algorithm
,
int
groups
,
const
std
::
vector
<
int
>&
dilations
,
...
...
paddle/phi/kernels/impl/conv_transpose_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -227,8 +227,8 @@ void Conv2dTransposeKernel(const Context& ctx,
const
DenseTensor
&
filter
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
output_padding
,
const
IntArray
&
output_size
,
const
std
::
vector
<
int
>&
output_padding
UNUSED
,
const
IntArray
&
output_size
UNUSED
,
const
std
::
string
&
padding_algorithm
,
int
groups
,
const
std
::
vector
<
int
>&
dilations
,
...
...
@@ -252,8 +252,8 @@ void Conv3dTransposeKernel(const Context& ctx,
const
DenseTensor
&
filter
,
const
std
::
vector
<
int
>&
strides
,
const
std
::
vector
<
int
>&
paddings
,
const
std
::
vector
<
int
>&
output_padding
,
const
std
::
vector
<
int
>&
output_size
,
const
std
::
vector
<
int
>&
output_padding
UNUSED
,
const
std
::
vector
<
int
>&
output_size
UNUSED
,
const
std
::
string
&
padding_algorithm
,
int
groups
,
const
std
::
vector
<
int
>&
dilations
,
...
...
paddle/phi/kernels/impl/elementwise_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -127,9 +127,9 @@ struct DivGradDX {
template
<
typename
T
>
struct
DivGradDX
<
phi
::
dtype
::
complex
<
T
>>
{
HOSTDEVICE
phi
::
dtype
::
complex
<
T
>
operator
()(
phi
::
dtype
::
complex
<
T
>
x
,
phi
::
dtype
::
complex
<
T
>
x
UNUSED
,
phi
::
dtype
::
complex
<
T
>
y
,
phi
::
dtype
::
complex
<
T
>
out
,
phi
::
dtype
::
complex
<
T
>
out
UNUSED
,
phi
::
dtype
::
complex
<
T
>
dout
)
const
{
phi
::
dtype
::
complex
<
T
>
y_conj
(
y
.
real
,
-
y
.
imag
);
return
dout
/
y_conj
;
...
...
@@ -146,7 +146,7 @@ struct DivGradDY {
template
<
typename
T
>
struct
DivGradDY
<
phi
::
dtype
::
complex
<
T
>>
{
HOSTDEVICE
phi
::
dtype
::
complex
<
T
>
operator
()(
phi
::
dtype
::
complex
<
T
>
x
,
phi
::
dtype
::
complex
<
T
>
x
UNUSED
,
phi
::
dtype
::
complex
<
T
>
y
,
phi
::
dtype
::
complex
<
T
>
out
,
phi
::
dtype
::
complex
<
T
>
dout
)
const
{
...
...
@@ -383,9 +383,9 @@ struct MulGradDX<bool> {
template
<
typename
T
>
struct
MulGradDX
<
phi
::
dtype
::
complex
<
T
>>
{
HOSTDEVICE
phi
::
dtype
::
complex
<
T
>
operator
()(
phi
::
dtype
::
complex
<
T
>
x
,
phi
::
dtype
::
complex
<
T
>
x
UNUSED
,
phi
::
dtype
::
complex
<
T
>
y
,
phi
::
dtype
::
complex
<
T
>
out
,
phi
::
dtype
::
complex
<
T
>
out
UNUSED
,
phi
::
dtype
::
complex
<
T
>
dout
)
const
{
phi
::
dtype
::
complex
<
T
>
y_conj
(
y
.
real
,
-
y
.
imag
);
return
dout
*
y_conj
;
...
...
@@ -420,8 +420,8 @@ template <typename T>
struct
MulGradDY
<
phi
::
dtype
::
complex
<
T
>>
{
HOSTDEVICE
phi
::
dtype
::
complex
<
T
>
operator
()(
phi
::
dtype
::
complex
<
T
>
x
,
phi
::
dtype
::
complex
<
T
>
y
,
phi
::
dtype
::
complex
<
T
>
out
,
phi
::
dtype
::
complex
<
T
>
y
UNUSED
,
phi
::
dtype
::
complex
<
T
>
out
UNUSED
,
phi
::
dtype
::
complex
<
T
>
dout
)
const
{
phi
::
dtype
::
complex
<
T
>
x_conj
(
x
.
real
,
-
x
.
imag
);
return
dout
*
x_conj
;
...
...
paddle/phi/kernels/impl/fft_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -81,7 +81,7 @@ void FFTC2RGradKernel(const Context& ctx,
const
std
::
vector
<
int64_t
>&
axes
,
const
std
::
string
&
normalization
,
bool
forward
,
int64_t
last_dim_size
,
int64_t
last_dim_size
UNUSED
,
DenseTensor
*
x_grad
)
{
using
C
=
phi
::
dtype
::
complex
<
T
>
;
ctx
.
template
Alloc
<
C
>(
x_grad
);
...
...
paddle/phi/kernels/impl/fft_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -44,7 +44,7 @@ void FFTC2RKernel(const Context& ctx,
const
std
::
vector
<
int64_t
>&
axes
,
const
std
::
string
&
normalization
,
bool
forward
,
int64_t
last_dim_size
,
int64_t
last_dim_size
UNUSED
,
DenseTensor
*
out
)
{
using
R
=
typename
T
::
value_type
;
// get real type
ctx
.
template
Alloc
<
R
>(
out
);
...
...
paddle/phi/kernels/impl/fold_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -25,7 +25,7 @@ namespace phi {
template
<
typename
T
,
typename
Context
>
void
FoldGradKernel
(
const
Context
&
ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
out_grad
,
const
std
::
vector
<
int
>&
output_sizes
,
const
std
::
vector
<
int
>&
kernel_sizes
,
...
...
paddle/phi/kernels/impl/kldiv_loss_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -36,7 +36,7 @@ struct KLDivLossBackward {
template
<
typename
T
,
typename
Context
>
void
KLDivLossGradKernel
(
const
Context
&
dev_ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
label
,
const
DenseTensor
&
d_out
,
const
std
::
string
&
reduction
,
...
...
paddle/phi/kernels/impl/lerp_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -98,10 +98,10 @@ static void LerpGradFunction(const Context& ctx,
template
<
typename
Context
,
typename
T
>
static
void
LerpGradFunctionZero
(
const
Context
&
ctx
,
const
DenseTensor
&
x
,
const
DenseTensor
&
y
,
const
DenseTensor
&
x
UNUSED
,
const
DenseTensor
&
y
UNUSED
,
const
DenseTensor
&
weight
,
const
DenseTensor
&
out
,
const
DenseTensor
&
out
UNUSED
,
const
DenseTensor
&
out_grad
,
DenseTensor
*
x_grad
,
DenseTensor
*
y_grad
)
{
...
...
paddle/phi/kernels/impl/logsumexp_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -55,7 +55,7 @@ void LogsumexpGradKernel(const Context& dev_ctx,
const
DenseTensor
&
out
,
const
DenseTensor
&
out_grad
,
const
std
::
vector
<
int64_t
>&
axis
,
bool
keepdim
,
bool
keepdim
UNUSED
,
bool
reduce_all
,
DenseTensor
*
in_grad
)
{
dev_ctx
.
template
Alloc
<
T
>(
in_grad
);
...
...
paddle/phi/kernels/impl/lu_grad_kernel_impl.h
浏览文件 @
c1f4005a
...
...
@@ -28,7 +28,7 @@ void LUGradKernel(const Context& dev_ctx,
const
DenseTensor
&
out
,
const
DenseTensor
&
pivots
,
const
DenseTensor
&
out_grad
,
bool
pivot
,
bool
pivot
UNUSED
,
DenseTensor
*
x_grad
)
{
dev_ctx
.
template
Alloc
<
T
>(
x_grad
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录