{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/184637773","pull_request_review_id":115875408,"id":184637773,"diff_hunk":"@@ -192,49 +192,29 @@ std::ostream& operator<<(std::ostream& os, const BeamSearch::Item& item);\n \n std::string ItemToString(const BeamSearch::Item& item);\n \n-class BeamSearchOp : public framework::OperatorBase {\n+template <typename DeviceContext, typename T>\n+class BeamSearchOpKernel : public framework::OpKernel<T> {\n  public:\n-  BeamSearchOp(const std::string& type,\n-               const framework::VariableNameMap& inputs,\n-               const framework::VariableNameMap& outputs,\n-               const framework::AttributeMap& attrs)\n-      : OperatorBase(type, inputs, outputs, attrs) {}\n-\n-  BeamSearchOp(const BeamSearchOp& o)\n-      : framework::OperatorBase(\n-            static_cast<const framework::OperatorBase&>(o)) {\n-    PADDLE_THROW(\"Not Implemented\");\n-  }\n-\n- private:\n-  void RunImpl(const framework::Scope& scope,\n-               const platform::Place& dev_place) const override {\n-    auto ids_var = scope.FindVar(Input(\"ids\"));\n-    auto scores_var = scope.FindVar(Input(\"scores\"));\n-    auto pre_ids_var = scope.FindVar(Input(\"pre_ids\"));\n+  void Compute(const framework::ExecutionContext& context) const override {\n+    auto ids_var = context.Input<framework::LoDTensor>(\"ids\");","path":"paddle/fluid/operators/beam_search_op.h","position":27,"original_position":27,"commit_id":"9997c916fc2061f280e81d58d489b48ae25a684d","original_commit_id":"9997c916fc2061f280e81d58d489b48ae25a684d","user":{"login":"jacquesqiao","id":3048612,"avatar_url":"https://avatars0.githubusercontent.com/u/3048612?v=4","gravatar_id":"","url":"https://api.github.com/users/jacquesqiao","html_url":"https://github.com/jacquesqiao","followers_url":"https://api.github.com/users/jacquesqiao/followers","following_url":"https://api.github.com/users/jacquesqiao/following{/other_user}","gists_url":"https://api.github.com/users/jacquesqiao/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquesqiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquesqiao/subscriptions","organizations_url":"https://api.github.com/users/jacquesqiao/orgs","repos_url":"https://api.github.com/users/jacquesqiao/repos","events_url":"https://api.github.com/users/jacquesqiao/events{/privacy}","received_events_url":"https://api.github.com/users/jacquesqiao/received_events","type":"User","site_admin":false},"body":"auto  =>  auto*","created_at":"2018-04-27T09:32:55Z","updated_at":"2018-04-27T09:32:55Z","html_url":"https://github.com/PaddlePaddle/Paddle/pull/10052#discussion_r184637773","pull_request_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/184637773"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/10052#discussion_r184637773"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052"}}},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052","id":182686035,"html_url":"https://github.com/PaddlePaddle/Paddle/pull/10052","diff_url":"https://github.com/PaddlePaddle/Paddle/pull/10052.diff","patch_url":"https://github.com/PaddlePaddle/Paddle/pull/10052.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/10052","number":10052,"state":"open","locked":false,"title":"Added kernel to Beam Search OP","user":{"login":"ktlichkid","id":11657533,"avatar_url":"https://avatars3.githubusercontent.com/u/11657533?v=4","gravatar_id":"","url":"https://api.github.com/users/ktlichkid","html_url":"https://github.com/ktlichkid","followers_url":"https://api.github.com/users/ktlichkid/followers","following_url":"https://api.github.com/users/ktlichkid/following{/other_user}","gists_url":"https://api.github.com/users/ktlichkid/gists{/gist_id}","starred_url":"https://api.github.com/users/ktlichkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktlichkid/subscriptions","organizations_url":"https://api.github.com/users/ktlichkid/orgs","repos_url":"https://api.github.com/users/ktlichkid/repos","events_url":"https://api.github.com/users/ktlichkid/events{/privacy}","received_events_url":"https://api.github.com/users/ktlichkid/received_events","type":"User","site_admin":false},"body":"resolve #10026 ","created_at":"2018-04-19T07:17:57Z","updated_at":"2018-04-27T09:32:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f628551aec8c3fdf7b977a1346b21839cb3bda0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/10052/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/9997c916fc2061f280e81d58d489b48ae25a684d","head":{"label":"ktlichkid:fix-10026","ref":"fix-10026","sha":"9997c916fc2061f280e81d58d489b48ae25a684d","user":{"login":"ktlichkid","id":11657533,"avatar_url":"https://avatars3.githubusercontent.com/u/11657533?v=4","gravatar_id":"","url":"https://api.github.com/users/ktlichkid","html_url":"https://github.com/ktlichkid","followers_url":"https://api.github.com/users/ktlichkid/followers","following_url":"https://api.github.com/users/ktlichkid/following{/other_user}","gists_url":"https://api.github.com/users/ktlichkid/gists{/gist_id}","starred_url":"https://api.github.com/users/ktlichkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktlichkid/subscriptions","organizations_url":"https://api.github.com/users/ktlichkid/orgs","repos_url":"https://api.github.com/users/ktlichkid/repos","events_url":"https://api.github.com/users/ktlichkid/events{/privacy}","received_events_url":"https://api.github.com/users/ktlichkid/received_events","type":"User","site_admin":false},"repo":{"id":130051801,"name":"Paddle","full_name":"ktlichkid/Paddle","owner":{"login":"ktlichkid","id":11657533,"avatar_url":"https://avatars3.githubusercontent.com/u/11657533?v=4","gravatar_id":"","url":"https://api.github.com/users/ktlichkid","html_url":"https://github.com/ktlichkid","followers_url":"https://api.github.com/users/ktlichkid/followers","following_url":"https://api.github.com/users/ktlichkid/following{/other_user}","gists_url":"https://api.github.com/users/ktlichkid/gists{/gist_id}","starred_url":"https://api.github.com/users/ktlichkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktlichkid/subscriptions","organizations_url":"https://api.github.com/users/ktlichkid/orgs","repos_url":"https://api.github.com/users/ktlichkid/repos","events_url":"https://api.github.com/users/ktlichkid/events{/privacy}","received_events_url":"https://api.github.com/users/ktlichkid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ktlichkid/Paddle","description":"PArallel Distributed Deep LEarning","fork":true,"url":"https://api.github.com/repos/ktlichkid/Paddle","forks_url":"https://api.github.com/repos/ktlichkid/Paddle/forks","keys_url":"https://api.github.com/repos/ktlichkid/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ktlichkid/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ktlichkid/Paddle/teams","hooks_url":"https://api.github.com/repos/ktlichkid/Paddle/hooks","issue_events_url":"https://api.github.com/repos/ktlichkid/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/ktlichkid/Paddle/events","assignees_url":"https://api.github.com/repos/ktlichkid/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/ktlichkid/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/ktlichkid/Paddle/tags","blobs_url":"https://api.github.com/repos/ktlichkid/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ktlichkid/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ktlichkid/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ktlichkid/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ktlichkid/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/ktlichkid/Paddle/languages","stargazers_url":"https://api.github.com/repos/ktlichkid/Paddle/stargazers","contributors_url":"https://api.github.com/repos/ktlichkid/Paddle/contributors","subscribers_url":"https://api.github.com/repos/ktlichkid/Paddle/subscribers","subscription_url":"https://api.github.com/repos/ktlichkid/Paddle/subscription","commits_url":"https://api.github.com/repos/ktlichkid/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ktlichkid/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ktlichkid/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ktlichkid/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ktlichkid/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/ktlichkid/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ktlichkid/Paddle/merges","archive_url":"https://api.github.com/repos/ktlichkid/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ktlichkid/Paddle/downloads","issues_url":"https://api.github.com/repos/ktlichkid/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/ktlichkid/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/ktlichkid/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/ktlichkid/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ktlichkid/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/ktlichkid/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/ktlichkid/Paddle/deployments","created_at":"2018-04-18T11:26:24Z","updated_at":"2018-04-25T03:57:24Z","pushed_at":"2018-04-27T07:40:57Z","git_url":"git://github.com/ktlichkid/Paddle.git","ssh_url":"git@github.com:ktlichkid/Paddle.git","clone_url":"https://github.com/ktlichkid/Paddle.git","svn_url":"https://github.com/ktlichkid/Paddle","homepage":"http://www.paddlepaddle.org/","size":101729,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"ee0497c45a4288e9ab086a8b5490fdad9ed9e4ce","user":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"repo":{"id":65711522,"name":"Paddle","full_name":"PaddlePaddle/Paddle","owner":{"login":"PaddlePaddle","id":23534030,"avatar_url":"https://avatars3.githubusercontent.com/u/23534030?v=4","gravatar_id":"","url":"https://api.github.com/users/PaddlePaddle","html_url":"https://github.com/PaddlePaddle","followers_url":"https://api.github.com/users/PaddlePaddle/followers","following_url":"https://api.github.com/users/PaddlePaddle/following{/other_user}","gists_url":"https://api.github.com/users/PaddlePaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/PaddlePaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaddlePaddle/subscriptions","organizations_url":"https://api.github.com/users/PaddlePaddle/orgs","repos_url":"https://api.github.com/users/PaddlePaddle/repos","events_url":"https://api.github.com/users/PaddlePaddle/events{/privacy}","received_events_url":"https://api.github.com/users/PaddlePaddle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PaddlePaddle/Paddle","description":"PArallel Distributed Deep LEarning","fork":false,"url":"https://api.github.com/repos/PaddlePaddle/Paddle","forks_url":"https://api.github.com/repos/PaddlePaddle/Paddle/forks","keys_url":"https://api.github.com/repos/PaddlePaddle/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PaddlePaddle/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PaddlePaddle/Paddle/teams","hooks_url":"https://api.github.com/repos/PaddlePaddle/Paddle/hooks","issue_events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/events","assignees_url":"https://api.github.com/repos/PaddlePaddle/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/PaddlePaddle/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/PaddlePaddle/Paddle/tags","blobs_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/PaddlePaddle/Paddle/languages","stargazers_url":"https://api.github.com/repos/PaddlePaddle/Paddle/stargazers","contributors_url":"https://api.github.com/repos/PaddlePaddle/Paddle/contributors","subscribers_url":"https://api.github.com/repos/PaddlePaddle/Paddle/subscribers","subscription_url":"https://api.github.com/repos/PaddlePaddle/Paddle/subscription","commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/PaddlePaddle/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/PaddlePaddle/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PaddlePaddle/Paddle/merges","archive_url":"https://api.github.com/repos/PaddlePaddle/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PaddlePaddle/Paddle/downloads","issues_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/PaddlePaddle/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/PaddlePaddle/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PaddlePaddle/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/PaddlePaddle/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/deployments","created_at":"2016-08-15T06:59:08Z","updated_at":"2018-04-27T09:26:36Z","pushed_at":"2018-04-27T09:25:51Z","git_url":"git://github.com/PaddlePaddle/Paddle.git","ssh_url":"git@github.com:PaddlePaddle/Paddle.git","clone_url":"https://github.com/PaddlePaddle/Paddle.git","svn_url":"https://github.com/PaddlePaddle/Paddle","homepage":"http://www.paddlepaddle.org/","size":101813,"stargazers_count":6809,"watchers_count":6809,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1845,"mirror_url":null,"archived":false,"open_issues_count":1253,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1845,"open_issues":1253,"watchers":6809,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/10052"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/10052"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/10052/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/10052/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/9997c916fc2061f280e81d58d489b48ae25a684d"}},"author_association":"NONE"}}
{"actor":{"display_login":"jacquesqiao"}}