Closed njzjz closed 1 week ago
doc/install/install-from-source.md
[style] ~89-~89: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_WANT_TO_VB) Context: ...e $deepmd_venv/bin/activate ``` if one wants to skip out of the virtual environment, he... --- [uncategorized] ~146-~146: Did you mean: “By default,”? (BY_DEFAULT_COMMA) Context: ... The path to TensorFlow Python library. By default the installer only finds TensorFlow und... --- [uncategorized] ~190-~190: “your” (belonging to you) seems less likely than “you”. (AI_HYDRA_LEO_CP_YOUR_YOU) Context: ...nccl pip install horovod mpi4py ``` If your work in a CPU environment, please prepa... --- [style] ~295-~295: Consider using “incompatible” to avoid wordiness. (NOT_ABLE_PREMIUM) Context: ...rch/pytorch/issues/51039), which may be not compatible with other libraries. ```bash cmake -D...
doc/install/install-from-source.md
335-335: null (MD014, commands-show-output) Dollar signs used before commands without showing output --- 336-336: null (MD014, commands-show-output) Dollar signs used before commands without showing output --- 107-107: null (MD040, fenced-code-language) Fenced code blocks should have a language specified --- 153-153: null (MD040, fenced-code-language) Fenced code blocks should have a language specified
.github/workflows/test_cuda.yml (1)
`52-58`: **Ensure correct environment variable assignment and usage.** The environment variables `PYTORCH_ROOT` and `TENSORFLOW_ROOT` are being set using Python commands, which is a robust way to dynamically determine their paths. However, the `DP_ENABLE_PYTORCH` variable is set to `1` without conditional checks, which might not be suitable for all build configurations or might conflict with other settings. Consider adding conditions or configurations to enable/disable this based on specific needs.Verification successful
The search output confirms that `DP_ENABLE_PYTORCH` is set to `1` without any conditional logic in the `.github/workflows/test_cuda.yml` file. This suggests that the variable is always enabled in this workflow. To ensure that this is appropriate for all configurations, we should inspect the workflow file for any other relevant configurations or steps that might influence the necessity of `DP_ENABLE_PYTORCH`. Let's search for other environment variables or steps in the workflow that might provide context on whether `DP_ENABLE_PYTORCH` should always be enabled or if there are scenarios where it should be conditional. --- To understand the context and necessity of `DP_ENABLE_PYTORCH`, we need to extract and analyze the sections of the workflow file containing environment variables (`env:`) and steps (`steps:`). --- The extracted sections from the workflow file show that `DP_ENABLE_PYTORCH` is set to `1` without any conditional logic. Additionally, the presence of other environment variables and steps does not indicate any scenarios where `DP_ENABLE_PYTORCH` should be disabled or conditionally set. Given this, it appears that `DP_ENABLE_PYTORCH` is intended to be enabled for all configurations within this workflow. Therefore, the current setup seems appropriate, and no conditional logic is necessary for `DP_ENABLE_PYTORCH`. - `.github/workflows/test_cuda.yml`: `DP_ENABLE_PYTORCH` is set to `1` unconditionally.Scripts executed
The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Ensure that DP_ENABLE_PYTORCH is set correctly based on the build configurations. # Test: Search for conditional logic related to DP_ENABLE_PYTORCH in the workflow file. Expect: Conditional logic that sets DP_ENABLE_PYTORCH based on certain parameters. rg --type yaml 'DP_ENABLE_PYTORCH' .github/workflows/test_cuda.yml ``` Length of output: 95 --- --- Script: ```shell #!/bin/bash # Description: Search for environment variables and steps in the workflow file to understand the context of DP_ENABLE_PYTORCH. # Test: Look for other environment variables and steps in the workflow file that might influence the necessity of DP_ENABLE_PYTORCH. rg --type yaml 'env:' .github/workflows/test_cuda.yml rg --type yaml 'steps:' .github/workflows/test_cuda.yml ``` Length of output: 175 --- --- Script: ```shell #!/bin/bash # Description: Extract sections containing environment variables and steps for detailed inspection. # Test: Use rg to extract the sections containing env: and steps: from the workflow file. rg --type yaml -A 5 'env:' .github/workflows/test_cuda.yml rg --type yaml -A 5 'steps:' .github/workflows/test_cuda.yml ``` Length of output: 1340
It seems to me that we can still not enable PyTorch by default, as the default PyTorch on the PyPI requires NVCC...
CUDA_TOOLKIT_ROOT_DIR not found or specified
CMake Warning at /home/runner/.cache/uv/environments-v0/.tmpgyfA4c/lib/python3.11/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:31 (message):
Caffe2: CUDA cannot be found. Depending on whether you are building Caffe2
or a Caffe2 dependent library, the next warning / error will give you more
info.
Call Stack (most recent call first):
/home/runner/.cache/uv/environments-v0/.tmpgyfA4c/lib/python3.11/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:87 (include)
/home/runner/.cache/uv/environments-v0/.tmpgyfA4c/lib/python3.11/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:1[85](https://github.com/deepmodeling/deepmd-kit/actions/runs/9605428597/job/26493048913?pr=3891#step:11:86) (find_package)
CMake Error at /home/runner/.cache/uv/environments-v0/.tmpgyfA4c/lib/python3.11/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:91 (message):
Your installed Caffe2 version uses CUDA but I cannot find the CUDA
libraries. Please set the proper CUDA prefixes and / or install CUDA.
Call Stack (most recent call first):
/home/runner/.cache/uv/environments-v0/.tmpgyfA4c/lib/python3.11/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:185 (find_package)
Summary by CodeRabbit
Documentation
Chores
CI/CD