{"action":"created","comment":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/239711275","pull_request_review_id":182570604,"id":239711275,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTcxMTI3NQ==","diff_hunk":"@@ -63,6 +63,9 @@ void IRPassManager::CreatePasses(Argument *argument,\n       pass->Set(\"graph_viz_path\", new std::string(std::move(dot_file_path)));\n       pass_num++;\n     }\n+    if (pass_name == \"mkldnn_placement_pass\"){\n+       pass->Set(\"mkldnn_op_list\", new std::vector<std::string>(argument->mkldnn_op()));\n+    }","path":"paddle/fluid/inference/analysis/ir_pass_manager.cc","position":8,"original_position":6,"commit_id":"51e14114e47917e0ed3623ac2b0f41f08c0ca3c7","original_commit_id":"7c49a3089944faf9620ffd811da8a46d9339a148","user":{"login":"bingyanghuang","id":33643817,"node_id":"MDQ6VXNlcjMzNjQzODE3","avatar_url":"https://avatars3.githubusercontent.com/u/33643817?v=4","gravatar_id":"","url":"https://api.github.com/users/bingyanghuang","html_url":"https://github.com/bingyanghuang","followers_url":"https://api.github.com/users/bingyanghuang/followers","following_url":"https://api.github.com/users/bingyanghuang/following{/other_user}","gists_url":"https://api.github.com/users/bingyanghuang/gists{/gist_id}","starred_url":"https://api.github.com/users/bingyanghuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingyanghuang/subscriptions","organizations_url":"https://api.github.com/users/bingyanghuang/orgs","repos_url":"https://api.github.com/users/bingyanghuang/repos","events_url":"https://api.github.com/users/bingyanghuang/events{/privacy}","received_events_url":"https://api.github.com/users/bingyanghuang/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2018-12-07T07:07:50Z","updated_at":"2018-12-07T07:07:50Z","html_url":"https://github.com/PaddlePaddle/Paddle/pull/14768#discussion_r239711275","pull_request_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments/239711275"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/14768#discussion_r239711275"},"pull_request":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768"}},"in_reply_to_id":239423800},"pull_request":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768","id":236438611,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NDM4NjEx","html_url":"https://github.com/PaddlePaddle/Paddle/pull/14768","diff_url":"https://github.com/PaddlePaddle/Paddle/pull/14768.diff","patch_url":"https://github.com/PaddlePaddle/Paddle/pull/14768.patch","issue_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/14768","number":14768,"state":"open","locked":false,"title":"One possible solution to add flexibility for mkldnn placement pass","user":{"login":"bingyanghuang","id":33643817,"node_id":"MDQ6VXNlcjMzNjQzODE3","avatar_url":"https://avatars3.githubusercontent.com/u/33643817?v=4","gravatar_id":"","url":"https://api.github.com/users/bingyanghuang","html_url":"https://github.com/bingyanghuang","followers_url":"https://api.github.com/users/bingyanghuang/followers","following_url":"https://api.github.com/users/bingyanghuang/following{/other_user}","gists_url":"https://api.github.com/users/bingyanghuang/gists{/gist_id}","starred_url":"https://api.github.com/users/bingyanghuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingyanghuang/subscriptions","organizations_url":"https://api.github.com/users/bingyanghuang/orgs","repos_url":"https://api.github.com/users/bingyanghuang/repos","events_url":"https://api.github.com/users/bingyanghuang/events{/privacy}","received_events_url":"https://api.github.com/users/bingyanghuang/received_events","type":"User","site_admin":false},"body":"Solution for issue #14612 \r\nThis PR proposed one solution to selectively turn on \"use_mkldnn\" attribute in mkldnn_placement_pass. \r\nAfter investigation, we found that we can add attribute to each pass. So we decided to pass a string vector named op_list which contains all the op names we want to enable by this attribute of pass. \r\nYou can add the following code to test this functionality in line 177.  \r\n``` C++\r\n if (use_mkldnn) {    \r\n      cfg.EnableMKLDNN();  \r\n      std::vector<std::string> op_list ={\"conv3d\"};  \r\n      cfg.SetMKLDNNOp(op_list);  \r\n }\r\n```\r\nhttps://github.com/PaddlePaddle/Paddle/blob/e90afec47b0498e03950369323e4f85335c406f5/paddle/fluid/inference/tests/api/analyzer_dam_tester.cc#L177\r\n\r\nThis test will enable just conv3d  mkldnn kernel in DAM model. Meanwhile, you can test it with resnet50 to make sure that this works well with resnet50 too.","created_at":"2018-12-06T08:00:05Z","updated_at":"2018-12-07T07:07:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cc7b6ada2ffef45c73f781e5f79536510a77d63","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":831909412,"node_id":"MDU6TGFiZWw4MzE5MDk0MTI=","url":"https://api.github.com/repos/PaddlePaddle/Paddle/labels/Intel","name":"Intel","color":"53a9d1","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768/commits","review_comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768/comments","review_comment_url":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/14768/comments","statuses_url":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/51e14114e47917e0ed3623ac2b0f41f08c0ca3c7","head":{"label":"bingyanghuang:add_pass_attr_for_mkldnn","ref":"add_pass_attr_for_mkldnn","sha":"51e14114e47917e0ed3623ac2b0f41f08c0ca3c7","user":{"login":"bingyanghuang","id":33643817,"node_id":"MDQ6VXNlcjMzNjQzODE3","avatar_url":"https://avatars3.githubusercontent.com/u/33643817?v=4","gravatar_id":"","url":"https://api.github.com/users/bingyanghuang","html_url":"https://github.com/bingyanghuang","followers_url":"https://api.github.com/users/bingyanghuang/followers","following_url":"https://api.github.com/users/bingyanghuang/following{/other_user}","gists_url":"https://api.github.com/users/bingyanghuang/gists{/gist_id}","starred_url":"https://api.github.com/users/bingyanghuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingyanghuang/subscriptions","organizations_url":"https://api.github.com/users/bingyanghuang/orgs","repos_url":"https://api.github.com/users/bingyanghuang/repos","events_url":"https://api.github.com/users/bingyanghuang/events{/privacy}","received_events_url":"https://api.github.com/users/bingyanghuang/received_events","type":"User","site_admin":false},"repo":{"id":127225004,"node_id":"MDEwOlJlcG9zaXRvcnkxMjcyMjUwMDQ=","name":"Paddle","full_name":"bingyanghuang/Paddle","private":false,"owner":{"login":"bingyanghuang","id":33643817,"node_id":"MDQ6VXNlcjMzNjQzODE3","avatar_url":"https://avatars3.githubusercontent.com/u/33643817?v=4","gravatar_id":"","url":"https://api.github.com/users/bingyanghuang","html_url":"https://github.com/bingyanghuang","followers_url":"https://api.github.com/users/bingyanghuang/followers","following_url":"https://api.github.com/users/bingyanghuang/following{/other_user}","gists_url":"https://api.github.com/users/bingyanghuang/gists{/gist_id}","starred_url":"https://api.github.com/users/bingyanghuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingyanghuang/subscriptions","organizations_url":"https://api.github.com/users/bingyanghuang/orgs","repos_url":"https://api.github.com/users/bingyanghuang/repos","events_url":"https://api.github.com/users/bingyanghuang/events{/privacy}","received_events_url":"https://api.github.com/users/bingyanghuang/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bingyanghuang/Paddle","description":"PArallel Distributed Deep LEarning","fork":true,"url":"https://api.github.com/repos/bingyanghuang/Paddle","forks_url":"https://api.github.com/repos/bingyanghuang/Paddle/forks","keys_url":"https://api.github.com/repos/bingyanghuang/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bingyanghuang/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bingyanghuang/Paddle/teams","hooks_url":"https://api.github.com/repos/bingyanghuang/Paddle/hooks","issue_events_url":"https://api.github.com/repos/bingyanghuang/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/bingyanghuang/Paddle/events","assignees_url":"https://api.github.com/repos/bingyanghuang/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/bingyanghuang/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/bingyanghuang/Paddle/tags","blobs_url":"https://api.github.com/repos/bingyanghuang/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bingyanghuang/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bingyanghuang/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/bingyanghuang/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bingyanghuang/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/bingyanghuang/Paddle/languages","stargazers_url":"https://api.github.com/repos/bingyanghuang/Paddle/stargazers","contributors_url":"https://api.github.com/repos/bingyanghuang/Paddle/contributors","subscribers_url":"https://api.github.com/repos/bingyanghuang/Paddle/subscribers","subscription_url":"https://api.github.com/repos/bingyanghuang/Paddle/subscription","commits_url":"https://api.github.com/repos/bingyanghuang/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/bingyanghuang/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/bingyanghuang/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/bingyanghuang/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/bingyanghuang/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/bingyanghuang/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bingyanghuang/Paddle/merges","archive_url":"https://api.github.com/repos/bingyanghuang/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bingyanghuang/Paddle/downloads","issues_url":"https://api.github.com/repos/bingyanghuang/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/bingyanghuang/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/bingyanghuang/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/bingyanghuang/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bingyanghuang/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/bingyanghuang/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/bingyanghuang/Paddle/deployments","created_at":"2018-03-29T02:22:15Z","updated_at":"2018-12-06T06:23:38Z","pushed_at":"2018-12-07T07:04:16Z","git_url":"git://github.com/bingyanghuang/Paddle.git","ssh_url":"git@github.com:bingyanghuang/Paddle.git","clone_url":"https://github.com/bingyanghuang/Paddle.git","svn_url":"https://github.com/bingyanghuang/Paddle","homepage":"http://www.paddlepaddle.org/","size":141521,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PaddlePaddle:develop","ref":"develop","sha":"549f165b593e6de3335e5f65d9b94c1d4ca410f8","user":{"login":"PaddlePaddle","id":23534030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0MDMw","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,"node_id":"MDEwOlJlcG9zaXRvcnk2NTcxMTUyMg==","name":"Paddle","full_name":"PaddlePaddle/Paddle","private":false,"owner":{"login":"PaddlePaddle","id":23534030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0MDMw","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},"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-12-07T06:34:11Z","pushed_at":"2018-12-07T07:04:19Z","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":142632,"stargazers_count":7871,"watchers_count":7871,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2140,"mirror_url":null,"archived":false,"open_issues_count":715,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2140,"open_issues":715,"watchers":7871,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768"},"html":{"href":"https://github.com/PaddlePaddle/Paddle/pull/14768"},"issue":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/14768"},"comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/14768/comments"},"review_comments":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768/comments"},"review_comment":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/pulls/14768/commits"},"statuses":{"href":"https://api.github.com/repos/PaddlePaddle/Paddle/statuses/51e14114e47917e0ed3623ac2b0f41f08c0ca3c7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bingyanghuang"}}