PyTorch with C++11 ABI

Is there a pre-built version of PyTorch that uses the C++11 ABI? I need to be able to use TorchScript exported from Python in tch-rs which only works with C++11 ABI version of libtorch, but the pip version of PyTorch does not use the C++11 ABI (calling this returns False).

EDIT: After inspecting torch-sys's build.rs, apparently there are environment variables one can set to use the older ABI:

export TORCH_CUDA_VERSION=10.2
export LIBTORCH_CXX11_ABI=0
1 Like