Files
Kazuaki IshizakiandSvetlana Karslioglu 5ebcce8195 [docs] Convert cpp_index.rst from rST to MyST Markdown (#182820)
## Summary

Converts docs/source/cpp_index.rst from reStructuredText to MyST Markdown

Closes https://github.com/pytorch/pytorch/issues/182458

## Test plan

- [x] lintrunner -m main — no lint issues
- [x] Full Sphinx doc build — build succeeded, zero warnings for this file
- [x] HTML output verified after `make html`
- [x] git log --follow docs/source/cpp_index.md confirms history is preserved

Pull Request resolved: https://github.com/pytorch/pytorch/pull/182820
Approved by: https://github.com/svekars

Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
2026-05-08 13:47:45 +00:00

2.0 KiB
Raw Permalink Blame History

orphan
orphan
true

C++

If you are looking for the PyTorch C++ API docs, directly go [here](https://pytorch.org/cppdocs/).

PyTorch provides several features for working with C++, and it’s best to choose from them based on your needs. At a high level, the following support is available:

Tensor and Autograd in C++

Most of the tensor and autograd operations in PyTorch Python API are also available in the C++ API. These include:

Authoring Models in C++

We provide the full capability of authoring and training a neural net model purely in C++, with familiar components such as torch::nn / torch::nn::functional / torch::optim that closely resemble the Python API.

Packaging for C++

For guidance on how to install and link with libtorch (the library that contains all of the above C++ APIs), please see: https://pytorch.org/cppdocs/installing.html. Note that on Linux there are two types of libtorch binaries provided: one compiled with GCC pre-cxx11 ABI and the other with GCC cxx11 ABI, and you should make the selection based on the GCC ABI your system is using.