{"action":"created","comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/184830350","pull_request_review_id":116111291,"id":184830350,"diff_hunk":"@@ -25,18 +25,58 @@ limitations under the License.\n #include \"tensorflow/core/graph/graph_constructor.h\"\n #include \"tensorflow/core/lib/core/errors.h\"\n #include \"tensorflow/core/lib/core/status.h\"\n+#include \"tensorflow/core/lib/strings/strcat.h\"\n #include \"tensorflow/core/platform/types.h\"\n \n namespace tensorflow {\n namespace tensorrt {\n namespace segment {\n-\n+using ::tensorflow::strings::StrAppend;\n namespace {\n \n-bool CanContractEdge(const tensorflow::Edge* edge,\n-                     const tensorflow::Graph& graph) {\n-  const tensorflow::Node* src = edge->src();\n-  const tensorflow::Node* dst = edge->dst();\n+bool check_cycles(const Graph* g, const Node* src,","path":"tensorflow/contrib/tensorrt/segment/segment.cc","position":18,"original_position":18,"commit_id":"8838e2a84f98bd210147dc1a79e1037f2545dff9","original_commit_id":"8838e2a84f98bd210147dc1a79e1037f2545dff9","user":{"login":"samikama","id":10539540,"avatar_url":"https://avatars0.githubusercontent.com/u/10539540?v=4","gravatar_id":"","url":"https://api.github.com/users/samikama","html_url":"https://github.com/samikama","followers_url":"https://api.github.com/users/samikama/followers","following_url":"https://api.github.com/users/samikama/following{/other_user}","gists_url":"https://api.github.com/users/samikama/gists{/gist_id}","starred_url":"https://api.github.com/users/samikama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samikama/subscriptions","organizations_url":"https://api.github.com/users/samikama/orgs","repos_url":"https://api.github.com/users/samikama/repos","events_url":"https://api.github.com/users/samikama/events{/privacy}","received_events_url":"https://api.github.com/users/samikama/received_events","type":"User","site_admin":false},"body":"We were already using that when we were making copies of the graphs. But since this is prohibitively expensive,  we are using SimpleGraph now and the code you mentioned works only with TF Graph. check_cycles is pretty much a copy of the above code.","created_at":"2018-04-28T00:02:17Z","updated_at":"2018-04-28T00:02:17Z","html_url":"https://github.com/tensorflow/tensorflow/pull/18909#discussion_r184830350","pull_request_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/184830350"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/18909#discussion_r184830350"},"pull_request":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909"}},"in_reply_to_id":184795218},"pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909","id":184490918,"html_url":"https://github.com/tensorflow/tensorflow/pull/18909","diff_url":"https://github.com/tensorflow/tensorflow/pull/18909.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/18909.patch","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18909","number":18909,"state":"open","locked":false,"title":"Optimization pass and Memory allocator integration","user":{"login":"samikama","id":10539540,"avatar_url":"https://avatars0.githubusercontent.com/u/10539540?v=4","gravatar_id":"","url":"https://api.github.com/users/samikama","html_url":"https://github.com/samikama","followers_url":"https://api.github.com/users/samikama/followers","following_url":"https://api.github.com/users/samikama/following{/other_user}","gists_url":"https://api.github.com/users/samikama/gists{/gist_id}","starred_url":"https://api.github.com/users/samikama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samikama/subscriptions","organizations_url":"https://api.github.com/users/samikama/orgs","repos_url":"https://api.github.com/users/samikama/repos","events_url":"https://api.github.com/users/samikama/events{/privacy}","received_events_url":"https://api.github.com/users/samikama/received_events","type":"User","site_admin":false},"body":"This PR introduces TRTOptimizationPass to run TensorRT conversion automatically as an optimization pass at the time of running and also adds necessary components to integrate TensorRT memory allocation into TensorFlow memory systems.","created_at":"2018-04-26T23:39:03Z","updated_at":"2018-04-28T00:02:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0339cad5fd79f310009db9c5f7c8d1e1fd8699f2","assignee":{"login":"aaroey","id":31743510,"avatar_url":"https://avatars0.githubusercontent.com/u/31743510?v=4","gravatar_id":"","url":"https://api.github.com/users/aaroey","html_url":"https://github.com/aaroey","followers_url":"https://api.github.com/users/aaroey/followers","following_url":"https://api.github.com/users/aaroey/following{/other_user}","gists_url":"https://api.github.com/users/aaroey/gists{/gist_id}","starred_url":"https://api.github.com/users/aaroey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaroey/subscriptions","organizations_url":"https://api.github.com/users/aaroey/orgs","repos_url":"https://api.github.com/users/aaroey/repos","events_url":"https://api.github.com/users/aaroey/events{/privacy}","received_events_url":"https://api.github.com/users/aaroey/received_events","type":"User","site_admin":false},"assignees":[{"login":"aaroey","id":31743510,"avatar_url":"https://avatars0.githubusercontent.com/u/31743510?v=4","gravatar_id":"","url":"https://api.github.com/users/aaroey","html_url":"https://github.com/aaroey","followers_url":"https://api.github.com/users/aaroey/followers","following_url":"https://api.github.com/users/aaroey/following{/other_user}","gists_url":"https://api.github.com/users/aaroey/gists{/gist_id}","starred_url":"https://api.github.com/users/aaroey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaroey/subscriptions","organizations_url":"https://api.github.com/users/aaroey/orgs","repos_url":"https://api.github.com/users/aaroey/repos","events_url":"https://api.github.com/users/aaroey/events{/privacy}","received_events_url":"https://api.github.com/users/aaroey/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":300136587,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909/commits","review_comments_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909/comments","review_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18909/comments","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/8838e2a84f98bd210147dc1a79e1037f2545dff9","head":{"label":"samikama:optimization_pass","ref":"optimization_pass","sha":"8838e2a84f98bd210147dc1a79e1037f2545dff9","user":{"login":"samikama","id":10539540,"avatar_url":"https://avatars0.githubusercontent.com/u/10539540?v=4","gravatar_id":"","url":"https://api.github.com/users/samikama","html_url":"https://github.com/samikama","followers_url":"https://api.github.com/users/samikama/followers","following_url":"https://api.github.com/users/samikama/following{/other_user}","gists_url":"https://api.github.com/users/samikama/gists{/gist_id}","starred_url":"https://api.github.com/users/samikama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samikama/subscriptions","organizations_url":"https://api.github.com/users/samikama/orgs","repos_url":"https://api.github.com/users/samikama/repos","events_url":"https://api.github.com/users/samikama/events{/privacy}","received_events_url":"https://api.github.com/users/samikama/received_events","type":"User","site_admin":false},"repo":{"id":56879599,"name":"tensorflow","full_name":"samikama/tensorflow","owner":{"login":"samikama","id":10539540,"avatar_url":"https://avatars0.githubusercontent.com/u/10539540?v=4","gravatar_id":"","url":"https://api.github.com/users/samikama","html_url":"https://github.com/samikama","followers_url":"https://api.github.com/users/samikama/followers","following_url":"https://api.github.com/users/samikama/following{/other_user}","gists_url":"https://api.github.com/users/samikama/gists{/gist_id}","starred_url":"https://api.github.com/users/samikama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samikama/subscriptions","organizations_url":"https://api.github.com/users/samikama/orgs","repos_url":"https://api.github.com/users/samikama/repos","events_url":"https://api.github.com/users/samikama/events{/privacy}","received_events_url":"https://api.github.com/users/samikama/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samikama/tensorflow","description":"Computation using data flow graphs for scalable machine learning","fork":true,"url":"https://api.github.com/repos/samikama/tensorflow","forks_url":"https://api.github.com/repos/samikama/tensorflow/forks","keys_url":"https://api.github.com/repos/samikama/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samikama/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samikama/tensorflow/teams","hooks_url":"https://api.github.com/repos/samikama/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/samikama/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/samikama/tensorflow/events","assignees_url":"https://api.github.com/repos/samikama/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/samikama/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/samikama/tensorflow/tags","blobs_url":"https://api.github.com/repos/samikama/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samikama/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samikama/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/samikama/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samikama/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/samikama/tensorflow/languages","stargazers_url":"https://api.github.com/repos/samikama/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/samikama/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/samikama/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/samikama/tensorflow/subscription","commits_url":"https://api.github.com/repos/samikama/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/samikama/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/samikama/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/samikama/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/samikama/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/samikama/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samikama/tensorflow/merges","archive_url":"https://api.github.com/repos/samikama/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samikama/tensorflow/downloads","issues_url":"https://api.github.com/repos/samikama/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/samikama/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/samikama/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/samikama/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samikama/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/samikama/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/samikama/tensorflow/deployments","created_at":"2016-04-22T19:17:04Z","updated_at":"2018-04-26T16:53:29Z","pushed_at":"2018-04-27T00:36:39Z","git_url":"git://github.com/samikama/tensorflow.git","ssh_url":"git@github.com:samikama/tensorflow.git","clone_url":"https://github.com/samikama/tensorflow.git","svn_url":"https://github.com/samikama/tensorflow","homepage":"http://tensorflow.org","size":163484,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"master"}},"base":{"label":"tensorflow:master","ref":"master","sha":"8a428cdd350a56b9f7de2ed55b3fbe7b6ad6b257","user":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"repo":{"id":45717250,"name":"tensorflow","full_name":"tensorflow/tensorflow","owner":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorflow/tensorflow","description":"Computation using data flow graphs for scalable machine learning","fork":false,"url":"https://api.github.com/repos/tensorflow/tensorflow","forks_url":"https://api.github.com/repos/tensorflow/tensorflow/forks","keys_url":"https://api.github.com/repos/tensorflow/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorflow/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorflow/tensorflow/teams","hooks_url":"https://api.github.com/repos/tensorflow/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/tensorflow/tensorflow/events","assignees_url":"https://api.github.com/repos/tensorflow/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/tensorflow/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/tensorflow/tensorflow/tags","blobs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorflow/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorflow/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorflow/tensorflow/languages","stargazers_url":"https://api.github.com/repos/tensorflow/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/tensorflow/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/tensorflow/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/tensorflow/tensorflow/subscription","commits_url":"https://api.github.com/repos/tensorflow/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorflow/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorflow/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/tensorflow/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorflow/tensorflow/merges","archive_url":"https://api.github.com/repos/tensorflow/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorflow/tensorflow/downloads","issues_url":"https://api.github.com/repos/tensorflow/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorflow/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorflow/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/tensorflow/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/tensorflow/tensorflow/deployments","created_at":"2015-11-07T01:19:20Z","updated_at":"2018-04-27T23:51:19Z","pushed_at":"2018-04-27T23:56:52Z","git_url":"git://github.com/tensorflow/tensorflow.git","ssh_url":"git@github.com:tensorflow/tensorflow.git","clone_url":"https://github.com/tensorflow/tensorflow.git","svn_url":"https://github.com/tensorflow/tensorflow","homepage":"https://tensorflow.org","size":164157,"stargazers_count":97818,"watchers_count":97818,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62054,"mirror_url":null,"archived":false,"open_issues_count":1549,"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":62054,"open_issues":1549,"watchers":97818,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/18909"},"issue":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/18909"},"comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/18909/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/18909/commits"},"statuses":{"href":"https://api.github.com/repos/tensorflow/tensorflow/statuses/8838e2a84f98bd210147dc1a79e1037f2545dff9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"samikama"}}