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.


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.