Skip to content
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

Simplify operator development by making build system more automatic #3807

Closed
typhoonzero opened this issue Sep 1, 2017 · 1 comment · Fixed by #3881
Closed

Simplify operator development by making build system more automatic #3807

typhoonzero opened this issue Sep 1, 2017 · 1 comment · Fixed by #3881
Assignees

Comments

@typhoonzero
Copy link
Contributor

It's easier for developers to develop operators if we make our building system more "automatic".

As in #3801, we don't need to write lines in pybind/CMakeLists.txt and operators/CMakeLists.txt, further more, we can just let users to implemet xxx_op.h, xxx_op.cc/cu, test_xxx_op.py that's all!

@luotao1 luotao1 self-assigned this Sep 1, 2017
@luotao1
Copy link
Contributor

luotao1 commented Sep 1, 2017

We should remove USE_OP(XXX) in paddle/pybind/pybind.cc. We can auto generate USE_OP(XXX) into pybind.h file when building paddle/operators/CMakeLists.txt.

Followings things should be done before:

  • As USE_OP(add_two),we should rename add_op.cc/cu/h to add_two_op.cc/cu/h.
  • As USE_CPU_ONLY_OP(gather) and USE_CPU_ONLY_OP(scatter), we should remove gather_op.cu and scatter_op.cu,thus, paddle/operators/CMakeLists.txt can auto set USE_CPU_ONLY_OP for ops that only has .cc file.
  • As USE_OP_ITSELF(identity), we can move identiy_op out from scale_op, and new identity_op.cc/cu/h. Thus, USE_OP(identity) is ok.

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 a pull request may close this issue.

2 participants