# deployment

**URL:** https://dev-discuss.pytorch.org/c/deployment/11.md

[Latest](https://dev-discuss.pytorch.org/latest.md) · [Categories](https://dev-discuss.pytorch.org/categories.md)

---

## [About the deployment category](https://dev-discuss.pytorch.org/t/about-the-deployment-category/20)

<div class="topic-metadata">

**Author:** [@smth](https://dev-discuss.pytorch.org/u/smth)\
**Replies:** 0

</div>

notes and topics on production deployment

---

## [What is the correct, future-proof, way of deploying a pytorch python model in C++ for inference?](https://dev-discuss.pytorch.org/t/what-is-the-correct-future-proof-way-of-deploying-a-pytorch-python-model-in-c-for-inference/2775)

<div class="topic-metadata">

**Author:** [@raphael10-collab](https://dev-discuss.pytorch.org/u/raphael10-collab)\
**Replies:** 27\
**Last updated:** [August 27, 2026, 2:14pm UTC](https://dev-discuss.pytorch.org/t/what-is-the-correct-future-proof-way-of-deploying-a-pytorch-python-model-in-c-for-inference/2775 "2026-08-27T14:14:27Z")

</div>

Hi! I want to understand if it is possible, and how to do it, to deploy and use for inference in C++, pytorch models developed, and trained in python From here : Pytorch 2 and the c++ interface - #6 by ezyang - C++ - P…

---

## [\[BC Breaking\] \`torch.export.export\_for\_inference()\` API is removed](https://dev-discuss.pytorch.org/t/bc-breaking-torch-export-export-for-inference-api-is-removed/2866)

<div class="topic-metadata">

**Author:** [@gmagogsfm](https://dev-discuss.pytorch.org/u/gmagogsfm)\
**Replies:** 0\
**Last updated:** [March 24, 2025, 6:13pm UTC](https://dev-discuss.pytorch.org/t/bc-breaking-torch-export-export-for-inference-api-is-removed/2866 "2025-03-24T18:13:45Z")

</div>

With this PR, we removed an redundant API torch.export.export\_for\_inference(). If you are using it and affected by this BC-breaking change, please replace your callsite in the following way Before: ep = export\_for\_inf…

---

## [PyTorch 2.x Inference Recommendations](https://dev-discuss.pytorch.org/t/pytorch-2-x-inference-recommendations/2506)

<div class="topic-metadata">

**Author:** [@agunapal](https://dev-discuss.pytorch.org/u/agunapal)\
**Replies:** 11\
**Last updated:** [November 3, 2024, 2:13pm UTC](https://dev-discuss.pytorch.org/t/pytorch-2-x-inference-recommendations/2506 "2024-11-03T14:13:13Z")

</div>

PyTorch 2.x Inference Recommendations PyTorch 2.x introduces a range of new technologies for model inference and it can be overwhelming to figure out which technology is most appropriate for your particular use case. Thi…

---

## [What's the difference between torch.export / torchserve / executorch / aotinductor?](https://dev-discuss.pytorch.org/t/whats-the-difference-between-torch-export-torchserve-executorch-aotinductor/1642)

<div class="topic-metadata">

**Author:** [@youkaichao](https://dev-discuss.pytorch.org/u/youkaichao)\
**Replies:** 17\
**Last updated:** [October 17, 2024, 7:57pm UTC](https://dev-discuss.pytorch.org/t/whats-the-difference-between-torch-export-torchserve-executorch-aotinductor/1642 "2024-10-17T19:57:52Z")

</div>

I’m watching and learning from pytorch conference 2023, when I encountered these concepts. It seems they are all related to deploy models. To the best of my understanding: torch.export is a functionality in pytorch, t…

---

## [Exporting a model containing backpropagation to onnx](https://dev-discuss.pytorch.org/t/exporting-a-model-containing-backpropagation-to-onnx/1984)

<div class="topic-metadata">

**Author:** [@DavidMinorNV](https://dev-discuss.pytorch.org/u/DavidMinorNV)\
**Replies:** 0\
**Last updated:** [April 2, 2024, 6:15pm UTC](https://dev-discuss.pytorch.org/t/exporting-a-model-containing-backpropagation-to-onnx/1984 "2024-04-02T18:15:33Z")

</div>

Hello, We’ve got a model containing a bunch of stuff like transformers, slicing, indexing using arrays, concatenation etc and, most awkwardly, a call to torch.autograd.grad(), which I’ve been trying to export to onnx fo…

---

## [Minimal difference while converting .pt model to .onnx, using torch.export.onnx(), what is the reason?](https://dev-discuss.pytorch.org/t/minimal-difference-while-converting-pt-model-to-onnx-using-torch-export-onnx-what-is-the-reason/1941)

<div class="topic-metadata">

**Author:** [@manickavela29](https://dev-discuss.pytorch.org/u/manickavela29)\
**Replies:** 0\
**Last updated:** [March 14, 2024, 11:25am UTC](https://dev-discuss.pytorch.org/t/minimal-difference-while-converting-pt-model-to-onnx-using-torch-export-onnx-what-is-the-reason/1941 "2024-03-14T11:25:07Z")

</div>

Hi Everyone, What could be the possible reason for the slight difference in model weights, while exporting .pt model to .onnx, I havn’t looked into the implementation of torch.export() function but if anyone could give…

---

## [Plans about debugging tools for pt2e?](https://dev-discuss.pytorch.org/t/plans-about-debugging-tools-for-pt2e/1623)

<div class="topic-metadata">

**Author:** [@shuokay](https://dev-discuss.pytorch.org/u/shuokay)\
**Replies:** 1\
**Last updated:** [October 31, 2023, 11:53am UTC](https://dev-discuss.pytorch.org/t/plans-about-debugging-tools-for-pt2e/1623 "2023-10-31T11:53:36Z")

</div>

Recently, I’ve been learning the implementation of QAT with PyTorch 2.x. Up until now, it appears that the graph-based pt2e is becoming the predominant solution for QAT in the times ahead. Drawing upon my previous experi…

---

## [TorchServe: Increasing inference speed while improving efficiency](https://dev-discuss.pytorch.org/t/torchserve-increasing-inference-speed-while-improving-efficiency/1194)

<div class="topic-metadata">

**Author:** [@agunapal](https://dev-discuss.pytorch.org/u/agunapal)\
**Replies:** 0\
**Last updated:** [April 11, 2023, 6:01pm UTC](https://dev-discuss.pytorch.org/t/torchserve-increasing-inference-speed-while-improving-efficiency/1194 "2023-04-11T18:01:43Z")

</div>

Highlighting TorchServe’s technical accomplishments in 2022 Authors: Applied AI Team (PyTorch) at Meta & AWS In Alphabetical Order: Aaqib Ansari, Ankith Gunapal, Geeta Chauhan, Hamid Shojanazeri , Joshua An, Li Ning…

---

## [Torch::deploy - The Build](https://dev-discuss.pytorch.org/t/torch-deploy-the-build/238)

<div class="topic-metadata">

**Author:** [@wconstab](https://dev-discuss.pytorch.org/u/wconstab)\
**Replies:** 1\
**Last updated:** [May 25, 2021, 3:51pm UTC](https://dev-discuss.pytorch.org/t/torch-deploy-the-build/238 "2021-05-25T15:51:47Z")

</div>

Posts about torch::deploy — The Build (OSS) Overview torch::deploy offers a way to run python/pytorch code in a multithreaded environment, for example, to enable N threads to serve production traffic against a single cop…
