message: Bug-fix in GraphInfo related to optional tensors.
diff: @@ -14,6 +14,7 @@ limitations under the License.
  ==============================================================================*/
  #include "tensorflow/lite/graph_info.h"
  #include <algorithm>
  +#include "tensorflow/lite/c/c_api_internal.h"
  namespace tflite {
  @@ -138,7 +139,8 @@ class PartitionGraphIntoIndependentNodeSubsetsImpl {
  // See if all dependencies of this node are already assigned to a
  // node sub set.
  for (int input_tensor_index : TfLiteIntArrayView(node.inputs)) {
  - if (tensor_epochs_[input_tensor_index] == kEpochNotReady) {
  + if (input_tensor_index != kOptionalTensor &&
  + tensor_epochs_[input_tensor_index] == kEpochNotReady) {
  return false;
  }
  }
  @@ -162,6 +164,9 @@ class PartitionGraphIntoIndependentNodeSubsetsImpl {
  // Look at our inputs one more time to update that tensor's
  // epochs' outputs
  for (int input_tensor_index : TfLiteIntArrayView(node.inputs)) {
  + if (input_tensor_index == kOptionalTensor) {
  + continue;
  + }
  int input_epoch = tensor_epochs_[input_tensor_index];
  int node_epoch = current_epoch;
  if (input_epoch != node_epoch) {
  