-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Op refine for making build system more automatic #3852
Conversation
rename mse_cost into square_error_cost.
cuDNN Wrapper.
fix ctc edit distance evaluator can not print information in v2 API.
…_type Revert "Remove `grad_op_type` in `REGISTER_OP`"
Add a graph building example
package a new USE_NO_KERNEL_OP for USE_OP_ITSELF
add missing protostr for sub_nested_seq_layer.
paddle/operators/add_two_op.cu
Outdated
@@ -14,7 +14,7 @@ | |||
|
|||
#define EIGEN_USE_GPU | |||
#include "paddle/framework/op_registry.h" | |||
#include "paddle/operators/add_op.h" | |||
#include "paddle/operators/add_two_op.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why rename to add_two_op
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because REGISTER_OP(add_two, ops::AddOp, ops::AddOpMaker, add_two_grad, ops::AddOpGrad);
in add_op.cc
, and USE_OP(add_two)
in pybind.cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add_two_op
seems odd, add_op
may be more clear? Since we have mul_op
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, then I will revert and change add_two
in REGISTER_OP
and USE_OP
to be add
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much!
paddle/operators/CMakeLists.txt
Outdated
gather_op | ||
scatter_op) | ||
foreach(src ${ONLYCPU_OPS}) | ||
op_library(${src} SRCS ${src}.cc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make it simpler if we make op_library
smarter, just call op_library(${src})
, then it can do the following:
find if have both .cc
and .cu
file, call cc_library
and nv_library
to add corresponding library.
So we can call op_library(${src})
for general ops and op_library(${src} DEPS xxx)
for ops have dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I will refine it.
Most ops have the same name for .cc
and .cu
. But for recurrent_op
, the ${src}
is not recurrent_op.cc
and recurrent_op.cu
.
Thus, if ${src} is none
, cmake will auto find ${src}.cc
and ${src}.cu
. If user specific ${src}
, cmake will use what user specify.
fix #3807 (comment)