detect C++ ABI flag for cpp extensions from available runtime information (#18994)
authorSoumith Chintala <soumith@gmail.com>
Tue, 9 Apr 2019 00:43:57 +0000 (17:43 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 9 Apr 2019 00:50:03 +0000 (17:50 -0700)
commite0c593eae7679fbf9e08d933f695ba9781b24da2
treef35d21693d364c1bc769c36367f18c6f2c22d396
parentdf05c7fbac72d1b1695854492715d9b5e0f8f5bb
detect C++ ABI flag for cpp extensions from available runtime information (#18994)

Summary:
Previously, when a user built PyTorch from source, but set the version string manually to be binary-formatted, it would've simply used CXX11_ABI=0 incorrectly.

We have this information available at runtime with `torch._C._GLIBCXX_USE_CXX11_ABI`, so this PR improves the situation by simply using that information.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18994

Differential Revision: D14839393

Pulled By: soumith

fbshipit-source-id: ca92e0810b29ffe688be82326e02a64a5649a3ad
torch/utils/cpp_extension.py