C++ API: Is there a timeline of the major breaking changes to the backend?

We read from the documentation https://pytorch.org/cppdocs/ “At the moment, the C++ API should be considered “experimental”; we may make major breaking changes to the backend in order to improve the API, or in service of providing the Python interface to PyTorch, which is our most stable and best supported interface.”

So, being interested in developing and deploying pytorch models in C++, I would like to know if there is a timeline of the major breaking changes.

Marco

For the C++ frontend, there will be BC-breaking changes in v1.4 and v1.5 to make it behave more similar to the Python frontend, and we expect the core components (torch functions / tensor operators / autograd functions / NN functionals / NN layers / optimizers) to be mostly stable afterwards.

If by “deploying pytorch models in C++” you meant running JIT model inference in C++, @Michael_Suo would have more information about it. :smiley:

Thanks a lot @yf225 . When pytorch C++ frontend v1.4 and, the following v.1.5 will be made available to use? Are we now at v.1.2 …right?

@marcoippolito We are now at v1.3 (https://pytorch.org/blog/pytorch-1-dot-3-adds-mobile-privacy-quantization-and-named-tensors/), and we usually release new versions every 2-3 months. :smiley:

1 Like

So it means that it’s better to wait 4/5 months to the version v.1.5 in order to work with a rather stable version?

The BC-breaking changes would mostly be NN layer options parameter name changes, NN layer / optimizer behavior changes and torch function default dtype changes to make them consistent with the Python frontend, and we will thoroughly document them in the upcoming releases. If the goal is to have the least maintenance overhead when upgrading to v1.4 or v1.5, it would be a good idea to wait for v1.5 to work with a rather stable version.

From here https://pytorch.org/cppdocs/ it seems that the C++API is still in beta release.
What version are we now? v1.4 or v1.5?

@yf225

Hi!
here : https://pytorch.org/blog/pytorch-1-dot-5-released-with-new-and-updated-apis/
we read : “Today, we’re announcing the availability of PyTorch 1.5, along with new and updated libraries. This release includes several major new API additions and improvements. PyTorch now includes a significant update to the C++ frontend, ‘channels last’ memory format for computer vision models, and a stable release of the distributed RPC framework used for model-parallel training. The release also has new APIs for autograd for hessians and jacobians, and an API that allows the creation of Custom C++ Classes that was inspired by pybind.”
" C++ Frontend API (Stable)
The C++ frontend API is now at parity with Python, and the features overall have been moved to ‘stable’ (previously tagged as experimental)."

But here: https://pytorch.org/cppdocs/

"

Warning

At the moment, the C++ API should be considered “beta” stability; we may make major breaking changes to the backend in order to improve the API, or in service of providing the Python interface to PyTorch, which is our most stable and best supported interface.
"
What does it mean? Is the C++API now stable or still in “beta”?
Could you please clarify?
Thanks in advance

@marcoippolito
It seems our cppdoc is outdated. We are working on an update.
C++ API is stable now, we keep adding features though. @yf225

In case the effort needed to give a boost to the desired C++ API is at the moment too high,


I would suggest to ask for collective help within the C++ wide community.
I’m sure many C++ developers, who are notoriously willing to embark in difficult achievements, will be happy to help such great project like PyTorch
1 Like

@marcoippolito
Thanks for advise, yep, we will prioritize our work and definitely asking help lol.
Please following up here to see our further actions.