Skip to content

pybind USE_OP_DEVICE_KERNEL(XXX, CUDNN) automatically #8590

Closed
@luotao1

Description

@luotao1

file(APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(conv2d, CUDNN);\n")
file(APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(pool2d, CUDNN);\n")
file(APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(conv2d_transpose, CUDNN);\n")

Can we pybind USE_OP_DEVICE_KERNEL(XXX, CUDNN) automatically?

Otherwise, when we add new device kernel like MKLDNN, the operators/CMakeLists.txt will be very longer and many if-else likes:
https://github.com/PaddlePaddle/Paddle/pull/8451/files#diff-2f55eef7dba89ace8cdce5f5726dbee6R171-R195 in #8451

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