We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent accc331 commit a4d2481Copy full SHA for a4d2481
1 file changed
source/CMakeLists.txt
@@ -373,7 +373,15 @@ if(ENABLE_PYTORCH AND NOT DEEPMD_C_ROOT)
373
else()
374
# Maybe in macos/windows
375
if(NOT DEFINED OP_CXX_ABI)
376
- set(OP_CXX_ABI 0)
+ if(UNIX
377
+ AND NOT APPLE
378
+ AND Torch_VERSION VERSION_GREATER_EQUAL "2.8.0")
379
+ # https://github.com/deepmodeling/deepmd-kit/issues/4877
380
+ # torch.compiled_with_cxx11_abi in PyTorch 2.8 always return True
381
+ set(OP_CXX_ABI 1)
382
+ else()
383
+ set(OP_CXX_ABI 0)
384
+ endif()
385
endif()
386
set(OP_CXX_ABI_PT "${OP_CXX_ABI}")
387
0 commit comments