Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
bad01596
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看板
提交
bad01596
编写于
2月 24, 2018
作者:
Q
qiaolongfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename register macro
上级
d4dabe3e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
14 deletion
+14
-14
paddle/fluid/operators/compare_op.cc
paddle/fluid/operators/compare_op.cc
+9
-9
paddle/fluid/operators/compare_op.cu
paddle/fluid/operators/compare_op.cu
+4
-4
paddle/fluid/operators/compare_op.h
paddle/fluid/operators/compare_op.h
+1
-1
未找到文件。
paddle/fluid/operators/compare_op.cc
浏览文件 @
bad01596
...
@@ -83,7 +83,7 @@ class CompareOp : public framework::OperatorWithKernel {
...
@@ -83,7 +83,7 @@ class CompareOp : public framework::OperatorWithKernel {
}
// namespace operators
}
// namespace operators
}
// namespace paddle
}
// namespace paddle
#define REGISTER_
LOGICAL
_OP(op_type, _equation) \
#define REGISTER_
COMPARE
_OP(op_type, _equation) \
struct _##op_type##Comment { \
struct _##op_type##Comment { \
static char type[]; \
static char type[]; \
static char equation[]; \
static char equation[]; \
...
@@ -96,11 +96,11 @@ class CompareOp : public framework::OperatorWithKernel {
...
@@ -96,11 +96,11 @@ class CompareOp : public framework::OperatorWithKernel {
::paddle::operators::CompareOpInferShape<_##op_type##Comment>, \
::paddle::operators::CompareOpInferShape<_##op_type##Comment>, \
::paddle::framework::EmptyGradOpMaker);
::paddle::framework::EmptyGradOpMaker);
REGISTER_
LOGICAL
_OP
(
less_than
,
"Out = X < Y"
);
REGISTER_
COMPARE
_OP
(
less_than
,
"Out = X < Y"
);
REGISTER_
LOGICAL
_KERNEL
(
less_than
,
CPU
,
paddle
::
operators
::
LessThanFunctor
);
REGISTER_
COMPARE
_KERNEL
(
less_than
,
CPU
,
paddle
::
operators
::
LessThanFunctor
);
REGISTER_
LOGICAL
_OP
(
less_equal
,
"Out = X <= Y"
);
REGISTER_
COMPARE
_OP
(
less_equal
,
"Out = X <= Y"
);
REGISTER_
LOGICAL
_KERNEL
(
less_equal
,
CPU
,
paddle
::
operators
::
LessEqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
less_equal
,
CPU
,
paddle
::
operators
::
LessEqualFunctor
);
REGISTER_
LOGICAL
_OP
(
equal
,
"Out = X == Y"
);
REGISTER_
COMPARE
_OP
(
equal
,
"Out = X == Y"
);
REGISTER_
LOGICAL
_KERNEL
(
equal
,
CPU
,
paddle
::
operators
::
EqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
equal
,
CPU
,
paddle
::
operators
::
EqualFunctor
);
REGISTER_
LOGICAL
_OP
(
not_equal
,
"Out = X != Y"
);
REGISTER_
COMPARE
_OP
(
not_equal
,
"Out = X != Y"
);
REGISTER_
LOGICAL
_KERNEL
(
not_equal
,
CPU
,
paddle
::
operators
::
NotEqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
not_equal
,
CPU
,
paddle
::
operators
::
NotEqualFunctor
);
paddle/fluid/operators/compare_op.cu
浏览文件 @
bad01596
...
@@ -14,7 +14,7 @@ limitations under the License. */
...
@@ -14,7 +14,7 @@ limitations under the License. */
#include "paddle/fluid/operators/compare_op.h"
#include "paddle/fluid/operators/compare_op.h"
REGISTER_
LOGICAL
_KERNEL
(
less_than
,
CUDA
,
paddle
::
operators
::
LessThanFunctor
);
REGISTER_
COMPARE
_KERNEL
(
less_than
,
CUDA
,
paddle
::
operators
::
LessThanFunctor
);
REGISTER_
LOGICAL
_KERNEL
(
less_equal
,
CUDA
,
paddle
::
operators
::
LessEqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
less_equal
,
CUDA
,
paddle
::
operators
::
LessEqualFunctor
);
REGISTER_
LOGICAL
_KERNEL
(
equal
,
CUDA
,
paddle
::
operators
::
EqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
equal
,
CUDA
,
paddle
::
operators
::
EqualFunctor
);
REGISTER_
LOGICAL
_KERNEL
(
not_equal
,
CUDA
,
paddle
::
operators
::
NotEqualFunctor
);
REGISTER_
COMPARE
_KERNEL
(
not_equal
,
CUDA
,
paddle
::
operators
::
NotEqualFunctor
);
paddle/fluid/operators/compare_op.h
浏览文件 @
bad01596
...
@@ -76,7 +76,7 @@ class CompareOpKernel
...
@@ -76,7 +76,7 @@ class CompareOpKernel
}
// namespace operators
}
// namespace operators
}
// namespace paddle
}
// namespace paddle
#define REGISTER_
LOGICAL
_KERNEL(op_type, dev, functor) \
#define REGISTER_
COMPARE
_KERNEL(op_type, dev, functor) \
REGISTER_OP_##dev##_KERNEL( \
REGISTER_OP_##dev##_KERNEL( \
op_type, ::paddle::operators::CompareOpKernel< \
op_type, ::paddle::operators::CompareOpKernel< \
::paddle::platform::dev##DeviceContext, functor<int>>, \
::paddle::platform::dev##DeviceContext, functor<int>>, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录