message: Fix expectations about the source of internal/external objects.
diff: @@ -585,18 +585,26 @@ class InferenceBuilderImpl : public InferenceBuilder {
  std::vector<TensorTieDef> links;
  links.reserve(values.size());
  for (const auto& value : values) {
  - TensorObjectDef def;
  + TensorObjectDef external_def;
  // So far the compiler always forces inputs and outputs to be in the fixed
  // format.
  const auto& shape = value->tensor.shape;
  - def.dimensions = Dimensions(shape.b, shape.h, shape.w, shape.c);
  - def.object_def.data_type = DataType::FLOAT32;
  - def.object_def.data_layout = DataLayout::DHWC4;
  - def.object_def.object_type = gpu::ObjectType::OPENGL_SSBO;
  - def.object_def.user_provided = true;
  + external_def.dimensions = Dimensions(shape.b, shape.h, shape.w, shape.c);
  + external_def.object_def.data_type = DataType::FLOAT32;
  + external_def.object_def.data_layout = DataLayout::DHWC4;
  + external_def.object_def.object_type = gpu::ObjectType::OPENGL_SSBO;
  +
  + // Internal object is not expected to be provided by user because: if
  + // external and internal objects have same defs, the external object is
  + // propagated and just used as an internal one; otherwise, if they have
  + // different defs, internal object will be created, because it is not
  + // provided by user.
  + TensorObjectDef internal_def = external_def;
  + external_def.object_def.user_provided = true;
  + internal_def.object_def.user_provided = false;
  AccessType access =
  graph_.IsGraphInput(value->id) ? AccessType::READ : AccessType::WRITE;
  - links.push_back({value->id, access, def, def});
  + links.push_back({value->id, access, external_def, internal_def});
  }
  return links;
  }
  