Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
a250c56c
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a250c56c
编写于
1月 12, 2022
作者:
Z
Zhang Ting
提交者:
GitHub
1月 12, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[part 4]change type of function args (#38888)
上级
86434818
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
8 deletion
+8
-8
paddle/fluid/operators/complex_op.h
paddle/fluid/operators/complex_op.h
+2
-2
paddle/fluid/operators/label_smooth_op.cu
paddle/fluid/operators/label_smooth_op.cu
+2
-2
paddle/fluid/operators/lgamma_op.cu
paddle/fluid/operators/lgamma_op.cu
+1
-1
paddle/fluid/operators/matrix_rank_op.h
paddle/fluid/operators/matrix_rank_op.h
+3
-3
未找到文件。
paddle/fluid/operators/complex_op.h
浏览文件 @
a250c56c
...
@@ -25,14 +25,14 @@ namespace operators {
...
@@ -25,14 +25,14 @@ namespace operators {
// functors to use with ElementwiseComputeEx
// functors to use with ElementwiseComputeEx
template
<
typename
T
>
template
<
typename
T
>
struct
RealAndImagToComplexFunctor
{
struct
RealAndImagToComplexFunctor
{
inline
HOSTDEVICE
platform
::
complex
<
T
>
operator
()(
const
T
&
x
,
const
T
&
y
)
{
inline
HOSTDEVICE
platform
::
complex
<
T
>
operator
()(
const
T
x
,
const
T
y
)
{
return
platform
::
complex
<
T
>
(
x
,
y
);
return
platform
::
complex
<
T
>
(
x
,
y
);
}
}
};
};
template
<
typename
T
>
template
<
typename
T
>
struct
ImagAndRealToComplexFunctor
{
struct
ImagAndRealToComplexFunctor
{
inline
HOSTDEVICE
platform
::
complex
<
T
>
operator
()(
const
T
&
y
,
const
T
&
x
)
{
inline
HOSTDEVICE
platform
::
complex
<
T
>
operator
()(
const
T
y
,
const
T
x
)
{
return
platform
::
complex
<
T
>
(
x
,
y
);
return
platform
::
complex
<
T
>
(
x
,
y
);
}
}
};
};
...
...
paddle/fluid/operators/label_smooth_op.cu
浏览文件 @
a250c56c
...
@@ -28,7 +28,7 @@ struct LabelSmoothFunctor {
...
@@ -28,7 +28,7 @@ struct LabelSmoothFunctor {
label_dim
=
static_cast
<
T
>
(
label_dim_data
);
label_dim
=
static_cast
<
T
>
(
label_dim_data
);
}
}
__device__
__forceinline__
T
operator
()(
const
T
&
x
)
const
{
__device__
__forceinline__
T
operator
()(
const
T
x
)
const
{
return
(
static_cast
<
T
>
(
1
-
epsilon
)
*
x
+
return
(
static_cast
<
T
>
(
1
-
epsilon
)
*
x
+
static_cast
<
T
>
(
epsilon
/
label_dim
));
static_cast
<
T
>
(
epsilon
/
label_dim
));
}
}
...
@@ -42,7 +42,7 @@ struct LabelSmoothGradFunctor {
...
@@ -42,7 +42,7 @@ struct LabelSmoothGradFunctor {
epsilon
=
static_cast
<
T
>
(
epsilon_data
);
epsilon
=
static_cast
<
T
>
(
epsilon_data
);
}
}
__device__
__forceinline__
T
operator
()(
const
T
&
x
)
const
{
__device__
__forceinline__
T
operator
()(
const
T
x
)
const
{
return
static_cast
<
T
>
(
1
-
epsilon
)
*
x
;
return
static_cast
<
T
>
(
1
-
epsilon
)
*
x
;
}
}
};
};
...
...
paddle/fluid/operators/lgamma_op.cu
浏览文件 @
a250c56c
...
@@ -21,7 +21,7 @@ namespace operators {
...
@@ -21,7 +21,7 @@ namespace operators {
template
<
typename
T
>
template
<
typename
T
>
struct
CudaLgammaFunctor
{
struct
CudaLgammaFunctor
{
__device__
__forceinline__
T
operator
()(
const
T
&
x
)
const
{
__device__
__forceinline__
T
operator
()(
const
T
x
)
const
{
return
Eigen
::
numext
::
lgamma
(
x
);
return
Eigen
::
numext
::
lgamma
(
x
);
}
}
};
};
...
...
paddle/fluid/operators/matrix_rank_op.h
浏览文件 @
a250c56c
...
@@ -48,17 +48,17 @@ static DDim RemoveLastDim(const DDim& dim) {
...
@@ -48,17 +48,17 @@ static DDim RemoveLastDim(const DDim& dim) {
template
<
typename
T
>
template
<
typename
T
>
struct
GreaterThanFunctor
{
struct
GreaterThanFunctor
{
HOSTDEVICE
int
operator
()(
const
T
&
a
,
const
T
&
b
)
const
{
return
a
>
b
;
}
HOSTDEVICE
int
operator
()(
const
T
a
,
const
T
b
)
const
{
return
a
>
b
;
}
};
};
template
<
typename
T
>
template
<
typename
T
>
struct
LessThanFunctor
{
struct
LessThanFunctor
{
HOSTDEVICE
int
operator
()(
const
T
&
a
,
const
T
&
b
)
const
{
return
a
<
b
;
}
HOSTDEVICE
int
operator
()(
const
T
a
,
const
T
b
)
const
{
return
a
<
b
;
}
};
};
template
<
typename
T
>
template
<
typename
T
>
struct
GreaterElementFunctor
{
struct
GreaterElementFunctor
{
HOSTDEVICE
T
operator
()(
const
T
&
a
,
const
T
&
b
)
const
{
HOSTDEVICE
T
operator
()(
const
T
a
,
const
T
b
)
const
{
if
(
a
>
b
)
{
if
(
a
>
b
)
{
return
a
;
return
a
;
}
else
{
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录