Skip to content

Conversation

@luotao1
Copy link
Contributor

@luotao1 luotao1 commented Sep 1, 2017

fix #3800

cc_test(net_op_test SRCS net_op_test.cc DEPS net_op)

op_library(add_op SRCS add_op.cc add_op.cu)
set(OP_WITHOUT_DEPS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting op names manually seems inconvenient and can be wrong of order. Maybe we can:

  1. find op source files under specific folder: ALL_OPS
  2. define a list containing ops that need to setup manually, including FRAMEWORK_OP(net_op), and ops need OP_DEPS
  3. exclude FRAMEWORK_OP and OP_DEPS from ALL_OPS, generating GENERAL_OPS
  4. sort GENERAL_OPS
  5. call op_library

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for your comment, I will refine it.
But net_op is similar to other ops, so we don't need FRAMEWORK_OP

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

@luotao1 luotao1 merged commit 2d31ab5 into PaddlePaddle:develop Sep 1, 2017
@luotao1 luotao1 deleted the op_cmake branch September 1, 2017 09:26
heavengate pushed a commit to heavengate/Paddle that referenced this pull request Aug 16, 2021
heavengate pushed a commit to heavengate/Paddle that referenced this pull request Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify the CMakeLists for paddle/operator and paddle/pybind

2 participants