{"action":"created","issue":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/7148","repository_url":"https://api.github.com/repos/PaddlePaddle/Paddle","labels_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/7148/labels{/name}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/7148/comments","events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/7148/events","html_url":"https://github.com/PaddlePaddle/Paddle/pull/7148","id":285430087,"number":7148,"title":"refine pybind when *_op.cc contains several operators","user":{"login":"luotao1","id":6836917,"avatar_url":"https://avatars0.githubusercontent.com/u/6836917?v=4","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-02T13:31:53Z","updated_at":"2018-04-17T20:12:37Z","closed_at":"2018-01-03T12:57:39Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/7148","html_url":"https://github.com/PaddlePaddle/Paddle/pull/7148","diff_url":"https://github.com/PaddlePaddle/Paddle/pull/7148.diff","patch_url":"https://github.com/PaddlePaddle/Paddle/pull/7148.patch"},"body":"fix https://github.com/PaddlePaddle/Paddle/issues/7059#issuecomment-354111897\r\n- for most op contains several operators, such as `conv_op`, `conv_cudnn_op`, etc\r\n  - auto pybind it by `REGEX MATCH REGISTER_OP(***,`, where `***` is the name for `USE_OP`/`USE_CPU_ONLY_OP` etc .\r\n- for other op whose `REGISTER_OP` is manually, such as `compare_op`:\r\nhttps://github.com/PaddlePaddle/Paddle/blob/fba6a10dd99edf6110280754555af78889f19dd3/paddle/operators/compare_op.cc#L81-L105\r\n   - manually pybind them."},"comment":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/comments/382126657","html_url":"https://github.com/PaddlePaddle/Paddle/pull/7148#issuecomment-382126657","issue_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/7148","id":382126657,"user":{"login":"tonyyang-svail","id":29932814,"avatar_url":"https://avatars2.githubusercontent.com/u/29932814?v=4","gravatar_id":"","url":"https://api.github.com/users/tonyyang-svail","html_url":"https://github.com/tonyyang-svail","followers_url":"https://api.github.com/users/tonyyang-svail/followers","following_url":"https://api.github.com/users/tonyyang-svail/following{/other_user}","gists_url":"https://api.github.com/users/tonyyang-svail/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyyang-svail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyyang-svail/subscriptions","organizations_url":"https://api.github.com/users/tonyyang-svail/orgs","repos_url":"https://api.github.com/users/tonyyang-svail/repos","events_url":"https://api.github.com/users/tonyyang-svail/events{/privacy}","received_events_url":"https://api.github.com/users/tonyyang-svail/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T20:12:37Z","updated_at":"2018-04-17T20:12:37Z","author_association":"CONTRIBUTOR","body":"hi @luotao1, just to confirm the reason for \"[it's enough to just adding one operator to pybind in a *_op.cc file](https://github.com/PaddlePaddle/Paddle/blob/6f8314235327848906bd7800743be376b01cdd74/paddle/fluid/operators/CMakeLists.txt#L109-L111)\" is that the linking of a single operator causes the linking of the whole object file, therefore all operators in that object file will be registered."}}
{"actor":{"display_login":"tonyyang-svail"}}