Skip to content
Merged
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
6 changes: 3 additions & 3 deletions backend/read_env.py
Comment thread
njzjz marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def get_argument_from_env() -> tuple[str, list, list, dict, str, str]:
# get variant option from the environment variables, available: cpu, cuda, rocm
dp_variant = os.environ.get("DP_VARIANT", "cpu").lower()
if dp_variant == "cpu" or dp_variant == "":
cmake_minimum_required_version = "3.16"
cmake_minimum_required_version = "3.25.2"
elif dp_variant == "cuda":
cmake_minimum_required_version = "3.23"
cmake_minimum_required_version = "3.25.2"
cmake_args.append("-DUSE_CUDA_TOOLKIT:BOOL=TRUE")
cuda_root = os.environ.get("CUDAToolkit_ROOT")
if cuda_root:
cmake_args.append(f"-DCUDAToolkit_ROOT:STRING={cuda_root}")
elif dp_variant == "rocm":
cmake_minimum_required_version = "3.21"
cmake_minimum_required_version = "3.25.2"
cmake_args.append("-DUSE_ROCM_TOOLKIT:BOOL=TRUE")
rocm_root = os.environ.get("ROCM_ROOT")
if not rocm_root:
Expand Down
2 changes: 1 addition & 1 deletion doc/install/install-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ mkdir build
cd build
```

The installation requires CMake 3.16 or later for the CPU version, CMake 3.23 or later for the CUDA support, and CMake 3.21 or later for the ROCM support. One can install CMake via `pip` if it is not installed or the installed version does not satisfy the requirement:
The installation requires CMake 3.25.2 or later for all platforms (CPU, CUDA, and ROCM). One can install CMake via `pip` if it is not installed or the installed version does not satisfy the requirement:

```sh
pip install -U cmake
Expand Down
2 changes: 1 addition & 1 deletion examples/infer_water/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.25.2)
project(infer_water)

# find DeePMD-kit
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,8 @@ DP_ENABLE_IPI = "1"
DP_ENABLE_PYTORCH = "1"
DP_ENABLE_PADDLE = "1"
# use CPU version of torch for building, which should also work for GPU
# note: uv has different behavior from pip on extra index url
# https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#packages-that-exist-on-multiple-indexes
UV_EXTRA_INDEX_URL = "https://download.pytorch.org/whl/cpu"
# https://docs.astral.sh/uv/guides/integration/pytorch/#automatic-backend-selection
UV_TORCH_BACKEND = "cpu"

[tool.cibuildwheel.windows]
test-extras = ["cpu", "torch", "paddle"]
Expand Down
8 changes: 4 additions & 4 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# new in 3.16: GET_RUNTIME_DEPENDENCIES, target_precompile_headers
cmake_minimum_required(VERSION 3.16)
# new in 3.25: RUN_OUTPUT_STDOUT_VARIABLE
cmake_minimum_required(VERSION 3.25.2)
project(DeePMD)

option(ENABLE_TENSORFLOW "Enable TensorFlow interface" OFF)
Expand Down Expand Up @@ -244,7 +244,7 @@ set(DP_VARIANT "cpu")

# define USE_CUDA_TOOLKIT
if(USE_CUDA_TOOLKIT)
cmake_minimum_required(VERSION 3.23)
cmake_minimum_required(VERSION 3.25.2)
find_package(CUDAToolkit REQUIRED)
if(NOT DEFINED CMAKE_CUDA_COMPILER)
set(CMAKE_CUDA_COMPILER ${CUDAToolkit_NVCC_EXECUTABLE})
Expand All @@ -261,7 +261,7 @@ endif(USE_CUDA_TOOLKIT)

# define USE_ROCM_TOOLKIT
if(USE_ROCM_TOOLKIT)
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.25.2)
include(CMakeDetermineHIPCompiler)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_HIP_COMPILER_ROCM_ROOT})
find_package(hip REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion source/api_c/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.25.2)
project(deepmd_api_c_test)

file(GLOB TEST_SRC test_*.cc)
Expand Down
2 changes: 1 addition & 1 deletion source/api_cc/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.25.2)
project(deepmd_api_test)

file(GLOB TEST_SRC test_*.cc)
Expand Down
7 changes: 4 additions & 3 deletions source/lib/src/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if(USE_CUDA_TOOLKIT)
# required cmake version 3.23: CMAKE_CUDA_ARCHITECTURES all
cmake_minimum_required(VERSION 3.23)
# required cmake version 3.25: CMAKE_CUDA_ARCHITECTURES all,
# RUN_OUTPUT_STDOUT_VARIABLE
cmake_minimum_required(VERSION 3.25.2)
# project name
project(deepmd_op_cuda)
set(GPU_LIB_NAME deepmd_op_cuda)
Expand Down Expand Up @@ -54,7 +55,7 @@ if(USE_CUDA_TOOLKIT)
elseif(USE_ROCM_TOOLKIT)

# required cmake version
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.25.2)
# project name
project(deepmd_op_rocm)
enable_language(HIP)
Expand Down
2 changes: 1 addition & 1 deletion source/lib/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.25.2)
project(libdeepmd_test)

file(GLOB TEST_SRC test_*.cc)
Expand Down
2 changes: 1 addition & 1 deletion source/lmp/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if(DEFINED LAMMPS_SOURCE_ROOT OR DEFINED LAMMPS_VERSION)
message(STATUS "enable LAMMPS plugin mode")
add_library(lammps_interface INTERFACE)
if(DEFINED LAMMPS_VERSION)
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.25.2)
include(FetchContent)
FetchContent_Declare(
lammps_download
Expand Down