Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,15 @@ if(ENABLE_PYTORCH AND NOT DEEPMD_C_ROOT)
else()
# Maybe in macos/windows
if(NOT DEFINED OP_CXX_ABI)
set(OP_CXX_ABI 0)
if(UNIX
AND NOT APPLE
AND Torch_VERSION VERSION_GREATER_EQUAL "2.8.0")
# https://github.com/deepmodeling/deepmd-kit/issues/4877
# torch.compiled_with_cxx11_abi in PyTorch 2.8 always return True
set(OP_CXX_ABI 1)
else()
set(OP_CXX_ABI 0)
endif()
endif()
set(OP_CXX_ABI_PT "${OP_CXX_ABI}")
endif()
Expand Down
Loading