You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove some configure warnings, and update comments.
This change also more accurately screens for when `torch._C` doesn't have the attribute `_PYBIND11_BUILD_ABI`.
Signed-off-by: zjgarvey <[email protected]>
-c "import torch; import sys; abi=torch._C._PYBIND11_BUILD_ABI; abi.startswith('_cxxabi10') or sys.exit(1); sys.stdout.write(str(abi[-2:]))"
76
+
-c "import torch; import sys; abi=getattr(torch._C, '_PYBIND11_BUILD_ABI', '-1'); abi=='-1' or abi.startswith('_cxxabi10') or sys.exit(1); sys.stdout.write(str(abi[-2:]))"
74
77
RESULT_VARIABLE _result
75
78
WORKING_DIRECTORY${CMAKE_CURRENT_SOURCE_DIR}
76
79
OUTPUT_VARIABLE _cxx_abi_version)
77
80
if(_result)
78
-
message(WARNING "Could not infer torch._C._PYBIND_BUILD_ABI. This was removed after pytorch updated to pybind11 version 3.0.1, and the TORCH_CXX_FLAGS manipulation is no longer required.")
81
+
message(FATAL_ERROR "Failed to determine C++ ABI version")
82
+
elseif(${_cxx_abi_version}STREQUAL"-1")
83
+
message(STATUS"Could not find `torch._C._PYBIND_BUILD_ABI`. This was removed in torch 2.9.0 (as of nightly release: dev20250826), and the TORCH_CXX_FLAGS manipulation is no longer required.")
84
+
# Everyone involved should be using cxx11 abi by default, but specify this just in case.
0 commit comments