Skip to content
Permalink
Browse files Browse the repository at this point in the history
Eliminate debug CHECK-fail from function.cc
PiperOrigin-RevId: 409416119
Change-Id: I8376ee464d434e9b970ff0ad49edfdaa2a273cfe
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Nov 12, 2021
1 parent 9550598 commit dcc21c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tensorflow/core/framework/function.cc
Expand Up @@ -191,7 +191,11 @@ class FunctionInstantiationHelper {
for (size_t i = 0; i < dtypes.size(); ++i) {
TF_RETURN_IF_ERROR(AddItem(strings::StrCat(arg_def.name(), ":", i),
{true, arg_index, 0, false, {dtypes[i]}}));
DCHECK_EQ(arg_index, result_.nodes.size());
if (arg_index != result_.nodes.size()) {
return errors::Internal(
"Expected arg_index to be equal to the number of nodes in result.",
" Got ", arg_index, " and ", result_.nodes.size());
}
string name = arg_def.name();
if (dtypes.size() > 1) {
strings::StrAppend(&name, "_", i);
Expand Down

0 comments on commit dcc21c7

Please sign in to comment.