# Consequences of PyTorch 2.0 on libtorch?

**URL:** <https://discuss.pytorch.org/t/consequences-of-pytorch-2-0-on-libtorch/167576>\
**Category:** C++\
**Created:** [December 5, 2022, 3:29pm UTC](https://discuss.pytorch.org/t/consequences-of-pytorch-2-0-on-libtorch/167576 "2022-12-05T15:29:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavier31](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/xavier31/32/11725_2.png) [@Xavier31](https://discuss.pytorch.org/u/Xavier31)\
**Post date:** [December 5, 2022, 3:29pm UTC](https://discuss.pytorch.org/t/consequences-of-pytorch-2-0-on-libtorch/167576/1 "2022-12-05T15:29:38Z")

</div>

Hi, I was wondering what kind of consequences the introduction of PyTorch 2.0 would have on libtorch ?  
If I understand correctly, this means throwing away Torchscript in favour of TorchInductor ? Would the compiled model in pytorch be directly usable in libtorch ?  
Thanks in advance for any insights

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [December 5, 2022, 5:09pm UTC](https://discuss.pytorch.org/t/consequences-of-pytorch-2-0-on-libtorch/167576/2 "2022-12-05T17:09:26Z")

</div>

From @Chillee on Slack:

> [TorchScript] is not deprecated. We are not actively developing torchscript, but it will be supported for the foreseeable future, and you’ll be able to use torchscript based backends behind dynamo. We currently have no plans on making torchinductor consume torchscript graphs. We are working on making the kernels it generates exportable to C++, but since the compiler is in Python (and so is much of Triton), I’m not sure there’s that much advantage to making it take in torchscript graphs.

---

<div class="post-metadata">

**Author:** ![Chenchao\_Zhao](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/chenchao_zhao/32/36481_2.png) [@Chenchao\_Zhao](https://discuss.pytorch.org/u/Chenchao_Zhao)\
**Post date:** [February 25, 2023, 9:06pm UTC](https://discuss.pytorch.org/t/consequences-of-pytorch-2-0-on-libtorch/167576/3 "2023-02-25T21:06:31Z")

</div>

TorchScript was getting more and more stable over the years now we are getting a new cutting edge paradigm with many potential bugs just like the early days of TS. I don’t see why that’s a rational choice.
