# What is the reason for using old ABI on Linux?

**URL:** <https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833>\
**Category:** hardware-backends\
**Created:** [October 26, 2022, 5:12pm UTC](https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833 "2022-10-26T17:12:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![artyom-beilis](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/artyom-beilis/32/207_2.png) [@artyom-beilis](https://dev-discuss.pytorch.org/u/artyom-beilis)\
**Post date:** [October 26, 2022, 5:12pm UTC](https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833/1 "2022-10-26T17:12:44Z")

</div>

I’m developing OpenCL backend. Till now I used custom build and for some reason it had `CXX11_ABI` set to 1 - probably due to custom build, now trying work agaist latest pytorch with better out of tree backend support and use pytorch from pip directly I found that it is all build with `-D_GLIBCXX_USE_CXX11_ABI=0`

That means that each and every C++ library I want to use in backend must be compiled with old ABI - including any 3rd party `C++` libraries I may want to use.

Questions:

1. What is the reason to use Old ABI?
2. Are there plans to change it, since it breaks compatibility with virtually any C++ library around?

Thanks,

Artyom

---

<div class="post-metadata">

**Author:** ![dzhulgakov](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/dzhulgakov/32/648_2.png) [@dzhulgakov](https://dev-discuss.pytorch.org/u/dzhulgakov)\
**Post date:** [October 30, 2022, 1:29am UTC](https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833/2 "2022-10-30T01:29:15Z")

</div>

I don’t remember why it’s the case by now. It’s possible that we used to target old compiler/systems, but it should be gone by now. @malfet might be able to comment more

---

<div class="post-metadata">

**Author:** ![malfet](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/malfet/32/129_2.png) [@malfet](https://dev-discuss.pytorch.org/u/malfet)\
**Post date:** [October 30, 2022, 5:16pm UTC](https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833/3 "2022-10-30T17:16:00Z")

</div>

Some related information here: [Status of pip wheels with \_GLIBCXX\_USE\_CXX11\_ABI=1 · Issue #51039 · pytorch/pytorch · GitHub](https://github.com/pytorch/pytorch/issues/51039)  
I.e. as long as we have to support CentOS 7/[PEP-599](https://peps.python.org/pep-0599/), we have to release wheels with old ABI (as new is just not available on that ancient OS)

Please note, that conda does not have to abide by that ancient standard, and conda packages likely already be released with CXX-11 ABI support

I don’t know how many users of CentOS7 based distros are there, but we can try to switch nightlies to manylinux\_2\_24 and target next release to use those. Or perhaps release both 2\_24 and manylinux2014 (aka manylinux\_2\_17) side by side

---

<div class="post-metadata">

**Author:** ![artyom-beilis](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/artyom-beilis/32/207_2.png) [@artyom-beilis](https://dev-discuss.pytorch.org/u/artyom-beilis)\
**Post date:** [October 30, 2022, 6:47pm UTC](https://dev-discuss.pytorch.org/t/what-is-the-reason-for-using-old-abi-on-linux/833/4 "2022-10-30T18:47:04Z")

</div>

Thanks a lot for the relevant pointers.

At this point in `dlprim_core` - the core deep learning API I use in OpenCL backend (like cuDNN for OpenCL) I don’t use any external C++ libraries so I can workaround by building without C++11 ABI. If the situation changes I’ll watch what happens in this issue

Thanks!
