Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ pin_tensorflow_gpu = [
pin_pytorch_cpu = [
# https://github.com/pytorch/pytorch/issues/114602
# macos x86 has been deprecated
"torch==2.11.0; platform_machine!='x86_64' or platform_system != 'Darwin'",
# Keep the established Python 3.10 pin; use 2.13 for newer CPU tests.
# torch 2.13 includes the AOTInductor int_array cache fix for bound methods:
# https://github.com/pytorch/pytorch/pull/178147
# vesin-torch 0.6.2 requires torch<2.15.
"torch==2.11.0; python_version<'3.11' and (platform_machine!='x86_64' or platform_system != 'Darwin')",
"torch==2.13.0; python_version>='3.11' and (platform_machine!='x86_64' or platform_system != 'Darwin')",
Comment thread
njzjz-bot marked this conversation as resolved.
Resolved
"torch; platform_machine=='x86_64' and platform_system == 'Darwin'",
]
pin_pytorch_gpu = [
Expand Down
6 changes: 4 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,10 @@ if(ENABLE_PYTORCH AND NOT DEEPMD_C_ROOT)
else()
set(DEEPMD_TORCH_HAS_CUDA FALSE)
endif()
# PyTorch 2.14 raised the minimum C++ standard from C++17 to C++20.
if(NOT Torch_VERSION VERSION_LESS "2.14.0")
# PyTorch 2.14 requires C++20. MSVC also needs it for the designated
# initializers and bit-field defaults already present in PyTorch 2.13 headers.
if(NOT Torch_VERSION VERSION_LESS "2.14.0"
OR (MSVC AND NOT Torch_VERSION VERSION_LESS "2.13.0"))
set_if_higher(CMAKE_CXX_STANDARD 20)
Comment thread
njzjz-bot marked this conversation as resolved.
Resolved
elseif(NOT Torch_VERSION VERSION_LESS "2.1.0")
set_if_higher(CMAKE_CXX_STANDARD 17)
Expand Down
Loading