Skip to content

[MLIR] TF Graphdef to MLIR python binding: input/output options#49380

Merged
copybara-service[bot] merged 1 commit intotensorflow:masterfrom
pashu123:upstream_changes
Jun 21, 2021
Merged

[MLIR] TF Graphdef to MLIR python binding: input/output options#49380
copybara-service[bot] merged 1 commit intotensorflow:masterfrom
pashu123:upstream_changes

Conversation

@pashu123
Copy link

Update the Python binding from Graphdef to TF-MLIR with input/output
options - add non-trivial test cases.

@google-ml-butler google-ml-butler bot added the size:M CL Change Size: Medium label May 20, 2021
@google-cla google-cla bot added the cla: yes label May 20, 2021
@pashu123 pashu123 force-pushed the upstream_changes branch 2 times, most recently from 409d4cd to 1f5e0dd Compare May 21, 2021 04:53
@gbaned gbaned self-assigned this May 21, 2021
@pashu123 pashu123 force-pushed the upstream_changes branch from 1f5e0dd to ef6b555 Compare May 23, 2021 05:32
@sanjoy sanjoy removed their request for review May 26, 2021 06:54
@pashu123 pashu123 force-pushed the upstream_changes branch 3 times, most recently from 066c523 to c900371 Compare June 16, 2021 17:15
@pashu123 pashu123 force-pushed the upstream_changes branch 3 times, most recently from 82ec9bc to 7b88dbd Compare June 17, 2021 09:23
Update the Python binding from Graphdef to TF-MLIR with input/output
options - add non-trivial test cases.
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jun 17, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 17, 2021
@gbaned gbaned removed the ready to pull PR ready for merge process label Jun 18, 2021
@gbaned gbaned added the ready to pull PR ready for merge process label Jun 18, 2021
@copybara-service copybara-service bot merged commit 0685c02 into tensorflow:master Jun 21, 2021
}
node_shapes.push_back(dims);
}
std::vector<string> output_nodes = absl::StrSplit(output_names, ',');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like if output_names is empty (e.g. because output_names=[] was passed to import_graphdef) this results in an error:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Output  was not found in graph

It may be enough to do

  if (!output_names.empty()) {
    std::vector<string> output_nodes = absl::StrSplit(output_names, ',');
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes ready to pull PR ready for merge process size:M CL Change Size: Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants