File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -404,3 +404,12 @@ except RuntimeError as e:
404
404
exit 1
405
405
fi
406
406
fi
407
+
408
+ # ##############################################################################
409
+ # Check for C++ ABI compatibility between gcc7 and gcc9 compiled binaries
410
+ # ##############################################################################
411
+ if [[ " $( uname) " == ' Linux' and (" $PACKAGE_TYPE " == ' conda' or " $PACKAGE_TYPE " == ' manywheel' ) ]]; then
412
+ pushd /tmp
413
+ python -c " import torch; exit(0 if torch._C._PYBIND11_BUILD_ABI == '_cxxabi1011' else 1)"
414
+ popd
415
+ fi
Original file line number Diff line number Diff line change 301
301
# Build PyTorch with Gloo's TCP_TLS transport
302
302
if [[ " $( uname) " == ' Linux' ]]; then
303
303
export USE_GLOO_WITH_OPENSSL=1
304
+
305
+ # Defining and Setting _GLIBCXX_USE_CXX11_ABI flag in order to make sure we are setting
306
+ # -fabi-version=11 flag in the pytorch CMake lists
307
+ export _GLIBCXX_USE_CXX11_ABI=0
304
308
fi
305
309
306
310
# Loop through all Python versions to build a package for each
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ requirements:
14
14
- {{ compiler('c') }} # [win]
15
15
- pkg-config # [unix]
16
16
- libuv # [unix]
17
-
17
+
18
18
host :
19
19
- python
20
20
- setuptools
80
80
- BUILD_TEST # [unix]
81
81
- USE_PYTORCH_METAL_EXPORT # [osx]
82
82
- USE_COREML_DELEGATE # [osx]
83
+ - _GLIBCXX_USE_CXX11_ABI # [unix]
83
84
84
85
test :
85
86
imports :
You can’t perform that action at this time.
0 commit comments