Skip to content

auto generate USE_OP(XXX) in pybind.cc #4055

Closed
@luotao1

Description

@luotao1

Currently, we should manually add USE_OP(XXX) in paddle/pybind.cc. To auto add USE_OP, we plan to generate a pybind.h file bypaddle/operators/CMakeLists.txt. For different Ops, the rules are as follows:

  • net_op doesn't need any USE_OP.
  • if XXX_op only has .cc file, it's USE_CPU_ONLY_OP.
  • if grep 'OperatorWithKernel' XXX_op.cc is null, it's USE_NO_KERNEL_OP
  • USE_NO_KERNEL_OP > USE_CPU_ONLY_OP: meas that if a op is both USE_NO_KERNEL_OP and USE_CPU_ONLY_OP, it is USE_NO_KERNEL_OP.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions