-
Notifications
You must be signed in to change notification settings - Fork 5.9k
CMake op_library function
#2897
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
Conversation
* It is used to create an operator library. It handles to split CPU and GPU sources and links operator common libraries. * It also give a reasonable warning and error when operator developer not correctly implement an operator. * Warning for lack of GPU kernel. * Same interface as `cc_library` to make code style consistent.
| else() | ||
| cc_library(add_op SRCS add_op.cc DEPS operator op_registry glog ddim) | ||
| endif() | ||
| function(op_library TARGET) |
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.
This not in generic.cmake because it is only used by building an operator, not a generic function.
paddle/operators/CMakeLists.txt
Outdated
| # for ops. | ||
| set(cc_srcs) | ||
| set(cu_srcs) | ||
| set(op_common_deps operator op_registry glog ddim) |
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.
paddle_memory is also needed for an operator
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.
It is very useful to make Tensor a library. Then we can propagate dependencies of tensor library. (Like eigen3 in future.)
35a6e78 to
38310f9
Compare
QiJune
left a comment
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.
LGTM
GPU sources and links operator common libraries.
not correctly implement an operator.
cc_libraryto make code style consistent.