-
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 #3881
Conversation
@typhoonzero As the commit info of #3852 is mass, I create a new PR, and all your commens are Done. |
Seem ci failed at:
|
I see it, I am trying to fix it. |
fix the ci error, and remove unnecessary |
// identity is a alias of scale op. This is also a example for creating a alias | ||
// operator. | ||
template <typename AttrType> | ||
class IdentityOpMaker : public framework::OpProtoAndCheckerMaker { |
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.
Why remove the identity_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.
@reyoung 只是把 identity_op
弄成了一个单独的文件,没有放在scale_op
里面,并没有删掉它。这样CMakeLists.txt能自动根据operators/
目录下的文件名,来获得有哪些op需要编译,之后也方便自动生成pybind.cc
中的USE_OP(XXX)
,而不用一个个手写添加。
list(LENGTH cu_srcs cu_srcs_len) | ||
list(LENGTH op_library_DEPS dep_len) | ||
if (${cu_srcs_len} EQUAL 0 AND ${dep_len} EQUAL 0) | ||
message(WARNING "The op library ${TARGET} not support GPU!") |
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.
Remove message is fine, because sometimes we can implement the CPU version only and then implement GPU version.
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!
fix #3807 (comment)
fix #3872 : As there will be more only-CPU ops, it is not necessary to message these lines.
related #3852 .