pybind11_proto from python to C++
The pybind11_proto doc mentions going from python to c++, and provides an [example](https://github.com/pybind/pybind11_protobuf#basic-example). You simply specify the function's proto argument as a const proto reference in c++, then pass the proto to that function in python. Unfortunately, there are issues with this when moving from google3 to OSS, so I don't have any example of TF code utilizing this feature, but you should be able to use it in your own code without issue!

If you do run into problems, one strategy for passing >2GB GraphDefs would be to Split in python, send the chunks and serialized ChunkMetadata to c++ as py::bytes, then Merge in c++. Yet another use case for our api ;)
@BlaziusMaximus thanks for the explanation.
I've been exploring how to update the [`import_graph_def()`](https://github.com/tensorflow/tensorflow/blob/v2.13.0/tensorflow/python/framework/importer.py#L353-L411) code-path to use pybind11_protobuf and I could use your help with the following:  Similar to how pybind11_protobuf allows us to pass protos directly from C++ to Python, is there a way to pass a `GraphDef` proto from python to C++ without performing serialization? This would be needed to invoke the [TF_GraphImportGraphDefWithResults](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.cc#L1801) from pywrap session in C++.

_Originally posted by @othakkar in https://github.com/tensorflow/community/issues/453#issuecomment-1674101660_
            