Skip to content

Commit 4ce8197

Browse files
committed
Update torch._C._PYBIND11_BUILD_ABI version check
* Skip tests for manywheel built with _GLIBCXX_USE_CXX11_ABI=1
1 parent cb27008 commit 4ce8197

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

check_binary.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,13 @@ fi
435435
###############################################################################
436436
# Check for C++ ABI compatibility between gcc7 and gcc9 compiled binaries
437437
###############################################################################
438-
if [[ "$(uname)" == 'Linux' && ("$PACKAGE_TYPE" == 'conda' || "$PACKAGE_TYPE" == 'manywheel') && GLIBCXX_USE_CXX11_ABI=0 ]]; then
438+
if [[ "$(uname)" == 'Linux' && ("$PACKAGE_TYPE" == 'conda' || "$PACKAGE_TYPE" == 'manywheel')]]; then
439439
pushd /tmp
440-
python -c "import torch; exit(0 if torch._C._PYBIND11_BUILD_ABI == '_cxxabi1011' else 1)"
440+
if [[ $(python -c "import torch; print(int(torch.compiled_with_cxx11_abi()))") == "1" ]]; then
441+
echo "Skip tests for manywheel built with _GLIBCXX_USE_CXX11_ABI=1"
442+
exit 0
443+
else
444+
python -c "import torch; exit(0 if torch._C._PYBIND11_BUILD_ABI == '_cxxabi1011' else 1)"
445+
fi
441446
popd
442447
fi

0 commit comments

Comments
 (0)