message: In Graph constructor, use `FunctionLibraryDefinition::num_functions()` to get number of functions.
  Previously, we were converting the FunctionLibraryDefinition to a FunctionDefLibrary proto to read out its number of functions, which incurs heavy allocation and deallocation costs when there are many functions.
diff: @@ -397,8 +397,7 @@ Graph::Graph(const OpRegistryInterface* ops)
  Graph::Graph(const FunctionLibraryDefinition& flib_def)
  : Graph(flib_def.default_registry()) {
  // Need a new-enough consumer to support the functions we add to the graph.
  - if (flib_def.ToProto().function_size() > 0 &&
  - versions_->min_consumer() < 12) {
  + if (flib_def.num_functions() > 0 && versions_->min_consumer() < 12) {
  versions_->set_min_consumer(12);
  }
  Status s = ops_.AddLibrary(flib_def);
  