Skip to content
Permalink
Browse files Browse the repository at this point in the history
Eliminate CHECK-fail from function.cc.
PiperOrigin-RevId: 409414744
Change-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Nov 12, 2021
1 parent 92dbfd9 commit 3d89911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensorflow/core/framework/function.cc
Expand Up @@ -181,7 +181,9 @@ class FunctionInstantiationHelper {
DataTypeVector dtypes;
TF_RETURN_IF_ERROR(
ArgNumType(attr_values, arg_def, &is_type_list, &dtypes));
CHECK_GE(dtypes.size(), size_t{1});
if (dtypes.size() < size_t{1}) {
return errors::Internal("Expected a list of at least one dtype");
}
int arg_index = result_.nodes.size();
TF_RETURN_IF_ERROR(
AddItem(arg_def.name(), {true, arg_index, 0, is_type_list, dtypes}));
Expand Down

0 comments on commit 3d89911

Please sign in to comment.