{"action":"created","comment":{"url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/comments/234803986","pull_request_review_id":176524831,"id":234803986,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDgwMzk4Ng==","diff_hunk":"@@ -3264,35 +3264,54 @@ static Status TranslateSplitVOp(\n     const Node* op, const std::vector<const Tensor*>& static_input_map,\n     Builder::OpMap& ng_op_map) {\n   shared_ptr<ng::Node> ng_input, ng_length, ng_split_dim;\n-  TF_RETURN_IF_ERROR(\n-      GetInputNodes(ng_op_map, op, &ng_input, &ng_length, &ng_split_dim));\n+  TF_RETURN_IF_ERROR(GetInputNode(ng_op_map, op, 0, &ng_input));\n \n   std::vector<int> lengths;\n   TF_RETURN_IF_ERROR(GetStaticInputVector(op, 1, static_input_map, &lengths));\n \n+  int length = 0;\n+  int shape_length = 0;\n+  int idx;\n+  for (int i = 0; i < lengths.size(); ++i) {\n+    if (lengths[i] != -1) {\n+      length += lengths[i];\n+    } else {\n+      idx = i;\n+    }\n+  }\n+\n   ng::Shape shape = ng_input->get_shape();\n   int rank = shape.size();\n-  std::vector<size_t> lower;\n-  std::vector<size_t> upper;\n-\n-  for (int i = 0; i < rank; ++i) {\n-    lower.push_back(0);\n-    upper.push_back(shape[i]);\n+  for (int i = 0; i < shape.size(); ++i) {\n+    shape_length += shape[i];\n+  }\n+  if (shape_length > length) {\n+    lengths[idx] = shape_length - length;\n   }","path":"src/ngraph_builder.cc","position":35,"original_position":35,"commit_id":"9e89743b32e24897c9de187c949062bdd2c4bc00","original_commit_id":"9e89743b32e24897c9de187c949062bdd2c4bc00","user":{"login":"sayantan-nervana","id":41931958,"node_id":"MDQ6VXNlcjQxOTMxOTU4","avatar_url":"https://avatars3.githubusercontent.com/u/41931958?v=4","gravatar_id":"","url":"https://api.github.com/users/sayantan-nervana","html_url":"https://github.com/sayantan-nervana","followers_url":"https://api.github.com/users/sayantan-nervana/followers","following_url":"https://api.github.com/users/sayantan-nervana/following{/other_user}","gists_url":"https://api.github.com/users/sayantan-nervana/gists{/gist_id}","starred_url":"https://api.github.com/users/sayantan-nervana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sayantan-nervana/subscriptions","organizations_url":"https://api.github.com/users/sayantan-nervana/orgs","repos_url":"https://api.github.com/users/sayantan-nervana/repos","events_url":"https://api.github.com/users/sayantan-nervana/events{/privacy}","received_events_url":"https://api.github.com/users/sayantan-nervana/received_events","type":"User","site_admin":false},"body":"shape[split_dim] - length","created_at":"2018-11-19T22:20:37Z","updated_at":"2018-11-19T22:20:37Z","html_url":"https://github.com/NervanaSystems/ngraph-tf/pull/311#discussion_r234803986","pull_request_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/comments/234803986"},"html":{"href":"https://github.com/NervanaSystems/ngraph-tf/pull/311#discussion_r234803986"},"pull_request":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311"}},"in_reply_to_id":234790604},"pull_request":{"url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311","id":231075545,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDc1NTQ1","html_url":"https://github.com/NervanaSystems/ngraph-tf/pull/311","diff_url":"https://github.com/NervanaSystems/ngraph-tf/pull/311.diff","patch_url":"https://github.com/NervanaSystems/ngraph-tf/pull/311.patch","issue_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/311","number":311,"state":"open","locked":false,"title":"Sindhu/Fix GNMT crash for DE-EN use case","user":{"login":"sindhu-nervana","id":43015792,"node_id":"MDQ6VXNlcjQzMDE1Nzky","avatar_url":"https://avatars3.githubusercontent.com/u/43015792?v=4","gravatar_id":"","url":"https://api.github.com/users/sindhu-nervana","html_url":"https://github.com/sindhu-nervana","followers_url":"https://api.github.com/users/sindhu-nervana/followers","following_url":"https://api.github.com/users/sindhu-nervana/following{/other_user}","gists_url":"https://api.github.com/users/sindhu-nervana/gists{/gist_id}","starred_url":"https://api.github.com/users/sindhu-nervana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindhu-nervana/subscriptions","organizations_url":"https://api.github.com/users/sindhu-nervana/orgs","repos_url":"https://api.github.com/users/sindhu-nervana/repos","events_url":"https://api.github.com/users/sindhu-nervana/events{/privacy}","received_events_url":"https://api.github.com/users/sindhu-nervana/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-15T05:46:48Z","updated_at":"2018-11-19T22:20:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb57a3cfa54614dbcad8a548687c3357f2c8792a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1072890402,"node_id":"MDU6TGFiZWwxMDcyODkwNDAy","url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/labels/WIP","name":"WIP","color":"f9ea0c","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311/commits","review_comments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311/comments","review_comment_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/311/comments","statuses_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/statuses/9e89743b32e24897c9de187c949062bdd2c4bc00","head":{"label":"NervanaSystems:sindhu/debug-gnmtinference","ref":"sindhu/debug-gnmtinference","sha":"9e89743b32e24897c9de187c949062bdd2c4bc00","user":{"login":"NervanaSystems","id":9260121,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNjAxMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/9260121?v=4","gravatar_id":"","url":"https://api.github.com/users/NervanaSystems","html_url":"https://github.com/NervanaSystems","followers_url":"https://api.github.com/users/NervanaSystems/followers","following_url":"https://api.github.com/users/NervanaSystems/following{/other_user}","gists_url":"https://api.github.com/users/NervanaSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/NervanaSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NervanaSystems/subscriptions","organizations_url":"https://api.github.com/users/NervanaSystems/orgs","repos_url":"https://api.github.com/users/NervanaSystems/repos","events_url":"https://api.github.com/users/NervanaSystems/events{/privacy}","received_events_url":"https://api.github.com/users/NervanaSystems/received_events","type":"Organization","site_admin":false},"repo":{"id":133988684,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5ODg2ODQ=","name":"ngraph-tf","full_name":"NervanaSystems/ngraph-tf","private":false,"owner":{"login":"NervanaSystems","id":9260121,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNjAxMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/9260121?v=4","gravatar_id":"","url":"https://api.github.com/users/NervanaSystems","html_url":"https://github.com/NervanaSystems","followers_url":"https://api.github.com/users/NervanaSystems/followers","following_url":"https://api.github.com/users/NervanaSystems/following{/other_user}","gists_url":"https://api.github.com/users/NervanaSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/NervanaSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NervanaSystems/subscriptions","organizations_url":"https://api.github.com/users/NervanaSystems/orgs","repos_url":"https://api.github.com/users/NervanaSystems/repos","events_url":"https://api.github.com/users/NervanaSystems/events{/privacy}","received_events_url":"https://api.github.com/users/NervanaSystems/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NervanaSystems/ngraph-tf","description":"Bridge to connect nGraph with TensorFlow","fork":false,"url":"https://api.github.com/repos/NervanaSystems/ngraph-tf","forks_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/forks","keys_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/teams","hooks_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/hooks","issue_events_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/events{/number}","events_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/events","assignees_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/assignees{/user}","branches_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/branches{/branch}","tags_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/tags","blobs_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/refs{/sha}","trees_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/statuses/{sha}","languages_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/languages","stargazers_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/stargazers","contributors_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/contributors","subscribers_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/subscribers","subscription_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/subscription","commits_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/commits{/sha}","git_commits_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/commits{/sha}","comments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/comments{/number}","issue_comment_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/comments{/number}","contents_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/contents/{+path}","compare_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/merges","archive_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/downloads","issues_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues{/number}","pulls_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls{/number}","milestones_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/milestones{/number}","notifications_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/labels{/name}","releases_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/releases{/id}","deployments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/deployments","created_at":"2018-05-18T18:08:43Z","updated_at":"2018-11-19T20:58:20Z","pushed_at":"2018-11-19T21:29:47Z","git_url":"git://github.com/NervanaSystems/ngraph-tf.git","ssh_url":"git@github.com:NervanaSystems/ngraph-tf.git","clone_url":"https://github.com/NervanaSystems/ngraph-tf.git","svn_url":"https://github.com/NervanaSystems/ngraph-tf","homepage":"","size":112762,"stargazers_count":38,"watchers_count":38,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":22,"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":3,"open_issues":22,"watchers":38,"default_branch":"master"}},"base":{"label":"NervanaSystems:master","ref":"master","sha":"79b7b144e250465aa28767eecdb9779c141e0c21","user":{"login":"NervanaSystems","id":9260121,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNjAxMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/9260121?v=4","gravatar_id":"","url":"https://api.github.com/users/NervanaSystems","html_url":"https://github.com/NervanaSystems","followers_url":"https://api.github.com/users/NervanaSystems/followers","following_url":"https://api.github.com/users/NervanaSystems/following{/other_user}","gists_url":"https://api.github.com/users/NervanaSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/NervanaSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NervanaSystems/subscriptions","organizations_url":"https://api.github.com/users/NervanaSystems/orgs","repos_url":"https://api.github.com/users/NervanaSystems/repos","events_url":"https://api.github.com/users/NervanaSystems/events{/privacy}","received_events_url":"https://api.github.com/users/NervanaSystems/received_events","type":"Organization","site_admin":false},"repo":{"id":133988684,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5ODg2ODQ=","name":"ngraph-tf","full_name":"NervanaSystems/ngraph-tf","private":false,"owner":{"login":"NervanaSystems","id":9260121,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNjAxMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/9260121?v=4","gravatar_id":"","url":"https://api.github.com/users/NervanaSystems","html_url":"https://github.com/NervanaSystems","followers_url":"https://api.github.com/users/NervanaSystems/followers","following_url":"https://api.github.com/users/NervanaSystems/following{/other_user}","gists_url":"https://api.github.com/users/NervanaSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/NervanaSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NervanaSystems/subscriptions","organizations_url":"https://api.github.com/users/NervanaSystems/orgs","repos_url":"https://api.github.com/users/NervanaSystems/repos","events_url":"https://api.github.com/users/NervanaSystems/events{/privacy}","received_events_url":"https://api.github.com/users/NervanaSystems/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NervanaSystems/ngraph-tf","description":"Bridge to connect nGraph with TensorFlow","fork":false,"url":"https://api.github.com/repos/NervanaSystems/ngraph-tf","forks_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/forks","keys_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/teams","hooks_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/hooks","issue_events_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/events{/number}","events_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/events","assignees_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/assignees{/user}","branches_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/branches{/branch}","tags_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/tags","blobs_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/refs{/sha}","trees_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/statuses/{sha}","languages_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/languages","stargazers_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/stargazers","contributors_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/contributors","subscribers_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/subscribers","subscription_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/subscription","commits_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/commits{/sha}","git_commits_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/git/commits{/sha}","comments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/comments{/number}","issue_comment_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/comments{/number}","contents_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/contents/{+path}","compare_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/merges","archive_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/downloads","issues_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues{/number}","pulls_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls{/number}","milestones_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/milestones{/number}","notifications_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/labels{/name}","releases_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/releases{/id}","deployments_url":"https://api.github.com/repos/NervanaSystems/ngraph-tf/deployments","created_at":"2018-05-18T18:08:43Z","updated_at":"2018-11-19T20:58:20Z","pushed_at":"2018-11-19T21:29:47Z","git_url":"git://github.com/NervanaSystems/ngraph-tf.git","ssh_url":"git@github.com:NervanaSystems/ngraph-tf.git","clone_url":"https://github.com/NervanaSystems/ngraph-tf.git","svn_url":"https://github.com/NervanaSystems/ngraph-tf","homepage":"","size":112762,"stargazers_count":38,"watchers_count":38,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":22,"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":3,"open_issues":22,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311"},"html":{"href":"https://github.com/NervanaSystems/ngraph-tf/pull/311"},"issue":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/311"},"comments":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/issues/311/comments"},"review_comments":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311/comments"},"review_comment":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/pulls/311/commits"},"statuses":{"href":"https://api.github.com/repos/NervanaSystems/ngraph-tf/statuses/9e89743b32e24897c9de187c949062bdd2c4bc00"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sayantan-nervana"}}