CMake 、Bazel、MSYS2、Pytorch等常用工具网址及下载

本文档整理了CMake、Bazel、OpenCV、MSYS2等开发工具的官方网站地址,提供下载链接,还包括TensorFlow、PyTorch、CUDA、TensorRT等库的下载资源,方便开发者快速获取最新版本。

CMake 、Bazel、MSYS2等常用工具网址及下载

cmake 官网
地址一:https://cmake.org
地址二:https://github.com/Kitware/CMake/releases
附:cmake-3.18.2-win64-x64.msi下载地址

https://cmake.org/
https://github.com/Kitware/CMake/releases

opencv 官网
地址:https://opencv.org/
附:opencv-4.5.2-vc14_vc15.exe下载链接

https://opencv.org/

MSYS2 官网
地址:https://www.msys2.org/
附:msys2-x86_64-20190521.exe下载链接

https://www.msys2.org/

Bazel Github官网
地址:https://github.com/bazelbuild/bazel
附:bazel-0.26.1-windows-x86_64.exe

https://github.com/bazelbuild/bazel

TensorflowC 官网
地址:https://storage.googleapis.com/tensorflow/
附:libtensorflow-cpu-windows-x86_64-1.15.0.zip

https://storage.googleapis.com/tensorflow/   //tensorflow c 接口

I tell you官网
地址:https://msdn.itellyou.cn/

https://msdn.itellyou.cn/

Pytorch
地址:https://pytorch.org/
附:Download here for C++ (Release version=1.9 )
附:Download here for C++ (Debug version=1.9 )

https://pytorch.org/

NVIDIA系列:
1.CUDA历史版本
地址:https://developer.nvidia.com/cuda-toolkit-archive
附:cuda_10.2.89_441.22_win10.exe

https://developer.nvidia.com/cuda-toolkit-archive

2.TensorRT
https://developer.nvidia.com/nvidia-tensorrt-8x-download

https://developer.nvidia.com/nvidia-tensorrt-8x-download

3.Cudnn 历史版本
https://developer.nvidia.com/rdp/cudnn-archive

https://developer.nvidia.com/rdp/cudnn-archive

Dll文件
地址:https://www.dll-files.com
附:VCRUNTIME140_1d.dll

 https://www.dll-files.com

OpenVino
地址:https://docs.openvinotoolkit.org/latest/index.html

https://docs.openvinotoolkit.org/latest/index.html

COCO2014数据集
https://pjreddie.com/projects/coco-mirror/

https://pjreddie.com/projects/coco-mirror/

http://images.cocodataset.org/zips/train2014.zip

http://images.cocodataset.org/annotations/annotations_trainval2014.zip

http://images.cocodataset.org/zips/val2014.zip

http://images.cocodataset.org/annotations/image_info_test2014.zip

http://images.cocodataset.org/zips/test2014.zip

http://images.cocodataset.org/annotations/image_info_test2015.zip

后续:不定期更新常用的网址及版本

PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> cd E:\PyTorch_Build\pytorch PS E:\PyTorch_Build\pytorch> python -m venv rtx5070_env PS E:\PyTorch_Build\pytorch> .\rtx5070_env\Scripts\activate (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 删除损坏的虚拟环境 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Remove-Item rtx5070_env -Recurse -Force -ErrorAction SilentlyContinue (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 创建新环境 (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -m venv rtx5070_env (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 激活环境 (rtx5070_env) PS E:\PyTorch_Build\pytorch> .\rtx5070_env\Scripts\Activate.ps1 (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 安装必要依赖 (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install numpy ninja pybind11 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting numpy Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl (12.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.9/12.9 MB 54.4 MB/s eta 0:00:00 Collecting ninja Downloading https://pypi.tuna.tsinghua.edu.cn/packages/29/45/c0adfbfb0b5895aa18cec400c535b4f7ff3e52536e0403602fc1a23f7de9/ninja-1.13.0-py3-none-win_amd64.whl (309 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 310.0/310.0 kB ? eta 0:00:00 Collecting pybind11 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cd/8a/37362fc2b949d5f733a8b0f2ff51ba423914cabefe69f1d1b6aab710f5fe/pybind11-3.0.1-py3-none-any.whl (293 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 293.6/293.6 kB ? eta 0:00:00 Installing collected packages: pybind11, numpy, ninja Successfully installed ninja-1.13.0 numpy-2.2.6 pybind11-3.0.1 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 设置环境变量 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $env:CUDA_PATH = "E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0" (rtx5070_env) PS E:\PyTorch_Build\pytorch> $env:Path = "$env:CUDA_PATH\bin;$env:Path" (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 修复虚拟环境 (rtx5070_env) PS E:\PyTorch_Build\pytorch> .\fix_venv.ps1 .\fix_venv.ps1: The term '.\fix_venv.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 配置构建参数 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $cmake_args = @( >> "-GNinja", >> "-DBUILD_PYTHON=ON", >> "-DUSE_CUDA=ON", >> "-DUSE_CUDNN=ON", >> "-DCUDNN_INCLUDE_DIR=E:\Program Files\NVIDIA\CUNND\v9.12\include\13.0", >> "-DCUDNN_LIBRARY=E:\Program Files\NVIDIA\CUNND\v9.12\lib\13.0\x64\cudnn64_9.lib", >> "-DTORCH_CUDA_ARCH_LIST=8.9", >> "-DCMAKE_BUILD_TYPE=Release" >> ) -join " " (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 配置构建 (rtx5070_env) PS E:\PyTorch_Build\pytorch> mkdir build -Force Directory: E:\PyTorch_Build\pytorch Mode LastWriteTime Length Name ---- ------------- ------ ---- da--- 2025/9/3 15:52 build (rtx5070_env) PS E:\PyTorch_Build\pytorch> cd build (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> cmake .. $cmake_args CMake Error: Could not create named generator Ninja -DBUILD_PYTHON=ON -DUSE_CUDA=ON -DUSE_CUDNN=ON -DCUDNN_INCLUDE_DIR=E:\Program Files\NVIDIA\CUNND\v9.12\include\13.0 -DCUDNN_LIBRARY=E:\Program Files\NVIDIA\CUNND\v9.12\lib\13.0\x64\cudnn64_9.lib -DTORCH_CUDA_ARCH_LIST=8.9 -DCMAKE_BUILD_TYPE=Release Generators * Visual Studio 17 2022 = Generates Visual Studio 2022 project files. Use -A option to specify architecture. Visual Studio 16 2019 = Generates Visual Studio 2019 project files. Use -A option to specify architecture. Visual Studio 15 2017 = Generates Visual Studio 2017 project files. Use -A option to specify architecture. Visual Studio 14 2015 = Generates Visual Studio 2015 project files. Use -A option to specify architecture. Borland Makefiles = Generates Borland makefiles. NMake Makefiles = Generates NMake makefiles. NMake Makefiles JOM = Generates JOM makefiles. MSYS Makefiles = Generates MSYS makefiles. MinGW Makefiles = Generates a make file for use with mingw32-make. Green Hills MULTI = Generates Green Hills MULTI files (experimental, work-in-progress). Unix Makefiles = Generates standard UNIX makefiles. Ninja = Generates build.ninja files. Ninja Multi-Config = Generates build-<Config>.ninja files. Watcom WMake = Generates Watcom WMake makefiles. CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files (deprecated). CodeBlocks - NMake Makefiles = Generates CodeBlocks project files (deprecated). CodeBlocks - NMake Makefiles JOM = Generates CodeBlocks project files (deprecated). CodeBlocks - Ninja = Generates CodeBlocks project files (deprecated). CodeBlocks - Unix Makefiles = Generates CodeBlocks project files (deprecated). CodeLite - MinGW Makefiles = Generates CodeLite project files (deprecated). CodeLite - NMake Makefiles = Generates CodeLite project files (deprecated). CodeLite - Ninja = Generates CodeLite project files (deprecated). CodeLite - Unix Makefiles = Generates CodeLite project files (deprecated). Eclipse CDT4 - NMake Makefiles = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - MinGW Makefiles = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files (deprecated). Kate - MinGW Makefiles = Generates Kate project files (deprecated). Kate - NMake Makefiles = Generates Kate project files (deprecated). Kate - Ninja = Generates Kate project files (deprecated). Kate - Ninja Multi-Config = Generates Kate project files (deprecated). Kate - Unix Makefiles = Generates Kate project files (deprecated). Sublime Text 2 - MinGW Makefiles = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - NMake Makefiles = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - Ninja = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - Unix Makefiles = Generates Sublime Text 2 project files (deprecated). (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> # 开始构建 (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> ninja install [0/1] Re-running CMake... FAILED: [code=1] build.ninja E:/PyTorch_Build/pytorch/build/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/protobuf/cmake/cmake_install.cmake E:/PyTorch_Build/pytorch/build/confu-deps/pthreadpool/cmake_install.cmake E:/PyTorch_Build/pytorch/build/FXdiv/cmake_install.cmake E:/PyTorch_Build/pytorch/build/confu-deps/cpuinfo/cmake_install.cmake E:/PyTorch_Build/pytorch/build/confu-deps/XNNPACK/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/googlemock/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/googletest/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/benchmark/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/benchmark/src/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ittapi/cmake_install.cmake E:/PyTorch_Build/pytorch/build/confu-deps/FP16/cmake_install.cmake E:/PyTorch_Build/pytorch/build/confu-deps/psimd/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/onnx/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/common/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/cpu/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/cpu/x64/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/interface/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/fake/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/dnnl/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/graph_compiler/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/utils/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/examples/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/tests/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/fmt/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/kineto/libkineto/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/kineto/libkineto/third_party/dynolog/dynolog/src/ipcfabric/cmake_install.cmake E:/PyTorch_Build/pytorch/build/third_party/mimalloc/cmake_install.cmake E:/PyTorch_Build/pytorch/build/torch/headeronly/cmake_install.cmake E:/PyTorch_Build/pytorch/build/c10/cmake_install.cmake E:/PyTorch_Build/pytorch/build/c10/test/cmake_install.cmake E:/PyTorch_Build/pytorch/build/c10/benchmark/cmake_install.cmake E:/PyTorch_Build/pytorch/build/c10/cuda/cmake_install.cmake E:/PyTorch_Build/pytorch/build/c10/cuda/test/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/THC/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/quantized/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/nnapi/cmake_install.cmake E:/PyTorch_Build/pytorch/build/sleef/cmake_install.cmake E:/PyTorch_Build/pytorch/build/sleef/src/cmake_install.cmake E:/PyTorch_Build/pytorch/build/sleef/src/libm/cmake_install.cmake E:/PyTorch_Build/pytorch/build/sleef/src/common/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/test/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/core/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/serialize/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/utils/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/perfkernels/cmake_install.cmake E:/PyTorch_Build/pytorch/build/test_jit/cmake_install.cmake E:/PyTorch_Build/pytorch/build/test_nativert/cmake_install.cmake E:/PyTorch_Build/pytorch/build/test_inductor/cmake_install.cmake E:/PyTorch_Build/pytorch/build/test_api/cmake_install.cmake E:/PyTorch_Build/pytorch/build/test_lazy/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/torch/cmake_install.cmake E:/PyTorch_Build/pytorch/build/caffe2/torch/lib/libshm_windows/cmake_install.cmake E:/PyTorch_Build/pytorch/build/functorch/cmake_install.cmake E:/PyTorch_Build/pytorch/build/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/protobuf/cmake/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/confu-deps/pthreadpool/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/FXdiv/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/confu-deps/cpuinfo/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/confu-deps/XNNPACK/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/googlemock/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/googletest/googletest/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/benchmark/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/benchmark/src/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ittapi/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/confu-deps/FP16/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/confu-deps/psimd/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/onnx/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/common/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/cpu/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/cpu/x64/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/interface/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/fake/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/dnnl/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/backend/graph_compiler/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/src/graph/utils/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/examples/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/ideep/mkl-dnn/tests/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/fmt/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/kineto/libkineto/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/kineto/libkineto/third_party/dynolog/dynolog/src/ipcfabric/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/third_party/mimalloc/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/torch/headeronly/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/c10/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/c10/test/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/c10/benchmark/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/c10/cuda/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/c10/cuda/test/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/THC/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/quantized/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/nnapi/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/sleef/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/sleef/src/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/sleef/src/libm/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/sleef/src/common/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/aten/src/ATen/test/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/core/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/serialize/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/utils/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/perfkernels/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/test_jit/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/test_nativert/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/test_inductor/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/test_api/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/test_lazy/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/torch/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/caffe2/torch/lib/libshm_windows/CTestTestfile.cmake E:/PyTorch_Build/pytorch/build/functorch/CTestTestfile.cmake E:\PyTorch_Build\pytorch\rtx5070_env\Lib\site-packages\cmake\data\bin\cmake.exe --regenerate-during-build -SE:\PyTorch_Build\pytorch -BE:\PyTorch_Build\pytorch\build CreateProcess failed: The system cannot find the file specified. ninja: error: rebuilding 'build.ninja': subcommand failed (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> # 验证安装 (rtx5070_env) PS E:\PyTorch_Build\pytorch\build> cd .. (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -c "import torch; print(f'PyTorch版本: {torch.__version__}, CUDA可用: {torch.cuda.is_available()}')" Traceback (most recent call last): File "<string>", line 1, in <module> File "E:\PyTorch_Build\pytorch\torch\__init__.py", line 35, in <module> from typing_extensions import ParamSpec as _ParamSpec, TypeIs as _TypeIs ModuleNotFoundError: No module named 'typing_extensions' (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 授予执行权限 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Set-ExecutionPolicy Bypass -Scope Process -Force (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 运行完整构建 (rtx5070_env) PS E:\PyTorch_Build\pytorch> .\build_pytorch.ps1 .\build_pytorch.ps1: The term '.\build_pytorch.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (rtx5070_env) PS E:\PyTorch_Build\pytorch>
09-04
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 接受所有必要的许可协议 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main accepted Terms of Service for https://repo.anaconda.com/pkgs/main (pytorch_env) PS E:\PyTorch_Build\pytorch> conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r accepted Terms of Service for https://repo.anaconda.com/pkgs/r (pytorch_env) PS E:\PyTorch_Build\pytorch> conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/msys2 accepted Terms of Service for https://repo.anaconda.com/pkgs/msys2 (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 安装所有依赖 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -c conda-forge -y ` >> libuv=1.46 ` >> openssl=3.1 ` >> numpy ` >> mkl=2024.1 ` >> mkl-include=2024.1 ` >> libblas=*=*mkl 3 channel Terms of Service accepted Retrieving notices: done Channels: - conda-forge - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - defaults Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - libuv=1.46 Current channels: - https://conda.anaconda.org/conda-forge - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - defaults To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证 MKL 安装 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -c "import mkl; print(f'MKL version: {mkl.__version__}')" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'mkl' (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置正确的 cuDNN 路径 (pytorch_env) PS E:\PyTorch_Build\pytorch> $cudnn_path = "E:\Program Files\NVIDIA\CUNND\v9.12" (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 清理之前的构建 (pytorch_env) PS E:\PyTorch_Build\pytorch> Remove-Item -Recurse -Force build -ErrorAction SilentlyContinue (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置环境变量 (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:CUDNN_ROOT_DIR = $cudnn_path (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:CUDNN_INCLUDE_DIR = "$cudnn_path\include" (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:CUDNN_LIBRARY = "$cudnn_path\lib\x64\cudnn.lib" (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 永久生效 (pytorch_env) PS E:\PyTorch_Build\pytorch> [Environment]::SetEnvironmentVariable("CUDNN_ROOT_DIR", $cudnn_path, "Machine") (pytorch_env) PS E:\PyTorch_Build\pytorch> [Environment]::SetEnvironmentVariable("CUDNN_INCLUDE_DIR", "$cudnn_path\include", "Machine") (pytorch_env) PS E:\PyTorch_Build\pytorch> [Environment]::SetEnvironmentVariable("CUDNN_LIBRARY", "$cudnn_path\lib\x64\cudnn.lib", "Machine") (pytorch_env) PS E:\PyTorch_Build\pytorch> # 切换到 PyTorch 源码目录 (pytorch_env) PS E:\PyTorch_Build\pytorch> Set-Location E:\PyTorch_Build\pytorch (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 创建缺失的 CMakeLists.txt (pytorch_env) PS E:\PyTorch_Build\pytorch> @" >> cmake_minimum_required(VERSION 3.18) >> project(torch) >> add_subdirectory(csrc) >> "@ | Out-File -FilePath torch\CMakeLists.txt -Encoding ASCII (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 创建缺失的 Python 文件 (pytorch_env) PS E:\PyTorch_Build\pytorch> New-Item -Path torch\_utils_internal.py -ItemType File -Force Directory: E:\PyTorch_Build\pytorch\torch Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2025/9/1 19:07 0 _utils_internal.py (pytorch_env) PS E:\PyTorch_Build\pytorch> New-Item -Path torch\csrc\api\include\torch\version.h.in -ItemType File -Force Directory: E:\PyTorch_Build\pytorch\torch\csrc\api\include\torch Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2025/9/1 19:07 0 version.h.in (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 添加基本内容到 version.h.in (pytorch_env) PS E:\PyTorch_Build\pytorch> @" >> #pragma once >> >> #define TORCH_VERSION_MAJOR 2 >> #define TORCH_VERSION_MINOR 9 >> #define TORCH_VERSION_PATCH 0 >> "@ | Out-File -FilePath torch\csrc\api\include\torch\version.h.in -Encoding ASCII (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置构建参数 (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:USE_CUDNN = "1" (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:MAX_JOBS = [Environment]::ProcessorCount (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 添加 MKL 路径 (pytorch_env) PS E:\PyTorch_Build\pytorch> $mkl_include = "$env:CONDA_PREFIX\Library\include" (pytorch_env) PS E:\PyTorch_Build\pytorch> $mkl_lib = "$env:CONDA_PREFIX\Library\lib\mkl_rt.lib" (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 构建命令 (pytorch_env) PS E:\PyTorch_Build\pytorch> python setup.py install --cmake ` >> -DMKL_INCLUDE_DIR="$mkl_include" ` >> -DMKL_LIBRARIES="$mkl_lib" ` >> -DCUDNN_INCLUDE_DIR="$env:CUDNN_INCLUDE_DIR" ` >> -DCUDNN_LIBRARY="$env:CUDNN_LIBRARY" ` >> 2>&1 | Tee-Object -FilePath build_log.txt Building wheel torch-2.9.0a0+git2d31c3d option -D not recognized (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置构建参数 (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:USE_CUDNN = "1" (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:MAX_JOBS = [Environment]::ProcessorCount (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 添加 MKL 路径 (pytorch_env) PS E:\PyTorch_Build\pytorch> $mkl_include = "$env:CONDA_PREFIX\Library\include" (pytorch_env) PS E:\PyTorch_Build\pytorch> $mkl_lib = "$env:CONDA_PREFIX\Library\lib\mkl_rt.lib" (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 构建命令 (pytorch_env) PS E:\PyTorch_Build\pytorch> python setup.py install --cmake ` >> -DMKL_INCLUDE_DIR="$mkl_include" ` >> -DMKL_LIBRARIES="$mkl_lib" ` >> -DCUDNN_INCLUDE_DIR="$env:CUDNN_INCLUDE_DIR" ` >> -DCUDNN_LIBRARY="$env:CUDNN_LIBRARY" ` >> 2>&1 | Tee-Object -FilePath build_log.txt Building wheel torch-2.9.0a0+git2d31c3d option -D not recognized (pytorch_env) PS E:\PyTorch_Build\pytorch> # Dockerfile (pytorch_env) PS E:\PyTorch_Build\pytorch> FROM nvidia/cuda:13.0-devel-ubuntu22.04 ParserError: Line | 1 | FROM nvidia/cuda:13.0-devel-ubuntu22.04 | ~~~~ | The 'from' keyword is not supported in this version of the language. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> RUN apt-get update && \ RUN: The term 'RUN' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> apt-get install -y git ninja-build python3-pip apt-get: The term 'apt-get' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> RUN pip3 install cmake RUN: The term 'RUN' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> RUN git clone https://github.com/pytorch/pytorch RUN: The term 'RUN' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> WORKDIR pytorch WORKDIR: The term 'WORKDIR' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> RUN git submodule update --init --recursive RUN: The term 'RUN' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch> RUN python3 setup.py install RUN: The term 'RUN' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch>
09-02
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 查找实际安装位置 (pytorch_env) PS E:\PyTorch_Build\pytorch> $condaPath = Get-ChildItem -Path C:\ -Recurse -Filter conda.bat -ErrorAction SilentlyContinue | >> Select-Object -First 1 | >> ForEach-Object { $_.DirectoryName } (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> if ($condaPath) { >> $env:PATH = "$condaPath;$env:PATH" >> [Environment]::SetEnvironmentVariable("PATH", $env:PATH, "Machine") >> Write-Host "Conda found at: $condaPath" -ForegroundColor Green >> } else { >> # 如果找不到,使用新安装的Miniconda >> $env:PATH = "C:\Miniconda3\Scripts;$env:PATH" >> } Conda found at: C:\Miniconda3\condabin (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda --version conda 25.7.0 (pytorch_env) PS E:\PyTorch_Build\pytorch> # 使用conda安装必要组件 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -c conda-forge -y ` >> libuv=1.46 ` >> openssl=3.1 ` >> numpy ` >> mkl=2024.1 ` >> mkl-include=2024.1 CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding: - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - https://repo.anaconda.com/pkgs/msys2 To accept these channels' Terms of Service, run the following commands: conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/msys2 For information on safely removing channels from your conda configuration, please see the official documentation: https://www.anaconda.com/docs/tools/working-with-conda/channels (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证MKL安装 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -c "import mkl; print(f'MKL version: {mkl.__version__}')" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'mkl' (pytorch_env) PS E:\PyTorch_Build\pytorch> # 使用conda安装必要组件 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -c conda-forge -y ` >> libuv=1.46 ` >> openssl=3.1 ` >> numpy ` >> mkl=2024.1 ` >> mkl-include=2024.1 CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding: - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - https://repo.anaconda.com/pkgs/msys2 To accept these channels' Terms of Service, run the following commands: conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/msys2 For information on safely removing channels from your conda configuration, please see the official documentation: https://www.anaconda.com/docs/tools/working-with-conda/channels (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证MKL安装 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -c "import mkl; print(f'MKL version: {mkl.__version__}')" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'mkl' (pytorch_env) PS E:\PyTorch_Build\pytorch> # 清理构建缓存 (pytorch_env) PS E:\PyTorch_Build\pytorch> Remove-Item -Recurse -Force build, dist Remove-Item: Cannot find path 'E:\PyTorch_Build\pytorch\dist' because it does not exist. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置构建参数 (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:USE_CUDNN = "1" (pytorch_env) PS E:\PyTorch_Build\pytorch> $env:MAX_JOBS = [Environment]::ProcessorCount (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 开始构建(添加详细日志) (pytorch_env) PS E:\PyTorch_Build\pytorch> python setup.py install --cmake 2>&1 | Tee-Object -FilePath build_log.txt Building wheel torch-2.9.0a0+git2d31c3d -- Building version 2.9.0a0+git2d31c3d E:\PyTorch_Build\pytorch\pytorch_env\lib\site-packages\setuptools\_distutils\_msvccompiler.py:12: UserWarning: _get_vc_env is private; find an alternative (pypa/distutils#340) warnings.warn( cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=E:\PyTorch_Build\pytorch\torch -DCMAKE_PREFIX_PATH=E:\PyTorch_Build\pytorch\pytorch_env\Lib\site-packages -DCUDNN_INCLUDE_DIR=E:\Program Files\NVIDIA\CUNND\v9.12\include -DCUDNN_LIBRARY=E:\Program Files\NVIDIA\CUNND\v9.12\lib\x64\cudnn.lib -DPython_EXECUTABLE=E:\PyTorch_Build\pytorch\pytorch_env\Scripts\python.exe -DTORCH_BUILD_VERSION=2.9.0a0+git2d31c3d -DUSE_CUDNN=1 -DUSE_NUMPY=True E:\PyTorch_Build\pytorch CMake Deprecation Warning at CMakeLists.txt:18 (cmake_policy): The OLD behavior for policy CMP0126 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. -- The CXX compiler identification is MSVC 19.44.35215.0 -- The C compiler identification is MSVC 19.44.35215.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Not forcing any particular BLAS to be found CMake Warning at CMakeLists.txt:425 (message): TensorPipe cannot be used on Windows. Set it to OFF CMake Warning at CMakeLists.txt:427 (message): KleidiAI cannot be used on Windows. Set it to OFF CMake Warning at CMakeLists.txt:439 (message): Libuv is not installed in current conda env. Set USE_DISTRIBUTED to OFF. Please run command 'conda install -c conda-forge libuv=1.39' to install libuv. -- Performing Test C_HAS_AVX_1 -- Performing Test C_HAS_AVX_1 - Success -- Performing Test C_HAS_AVX2_1 -- Performing Test C_HAS_AVX2_1 - Success -- Performing Test C_HAS_AVX512_1 -- Performing Test C_HAS_AVX512_1 - Success -- Performing Test CXX_HAS_AVX_1 -- Performing Test CXX_HAS_AVX_1 - Success -- Performing Test CXX_HAS_AVX2_1 -- Performing Test CXX_HAS_AVX2_1 - Success -- Performing Test CXX_HAS_AVX512_1 -- Performing Test CXX_HAS_AVX512_1 - Success -- Current compiler supports avx2 extension. Will build perfkernels. -- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY -- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Failed -- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Failed -- Could not find hardware support for NEON on this machine. -- No OMAP3 processor on this machine. -- No OMAP4 processor on this machine. -- Compiler does not support SVE extension. Will not build perfkernels. CMake Warning at CMakeLists.txt:845 (message): x64 operating system is required for FBGEMM. Not compiling with FBGEMM. Turn this warning off by USE_FBGEMM=OFF. -- Performing Test HAS/UTF_8 -- Performing Test HAS/UTF_8 - Success -- Found CUDA: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 (found version "13.0") -- The CUDA compiler identification is NVIDIA 13.0.48 with host compiler MSVC 19.44.35215.0 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Found CUDAToolkit: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/include (found version "13.0.48") -- PyTorch: CUDA detected: 13.0 -- PyTorch: CUDA nvcc is: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe -- PyTorch: CUDA toolkit directory: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- PyTorch: Header version is: 13.0 -- Found Python: E:\PyTorch_Build\pytorch\pytorch_env\Scripts\python.exe (found version "3.10.10") found components: Interpreter CMake Warning at cmake/public/cuda.cmake:140 (message): Failed to compute shorthash for libnvrtc.so Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:873 (include) -- Could NOT find CUDNN (missing: CUDNN_LIBRARY_PATH CUDNN_INCLUDE_PATH) CMake Warning at cmake/public/cuda.cmake:201 (message): Cannot find cuDNN library. Turning the option off Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:873 (include) -- Could NOT find CUSPARSELT (missing: CUSPARSELT_LIBRARY_PATH CUSPARSELT_INCLUDE_PATH) CMake Warning at cmake/public/cuda.cmake:226 (message): Cannot find cuSPARSELt library. Turning the option off Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:873 (include) -- Could NOT find CUDSS (missing: CUDSS_LIBRARY_PATH CUDSS_INCLUDE_PATH) CMake Warning at cmake/public/cuda.cmake:242 (message): Cannot find CUDSS library. Turning the option off Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:873 (include) -- USE_CUFILE is set to 0. Compiling without cuFile support -- Autodetected CUDA architecture(s): 12.0 CMake Warning at cmake/public/cuda.cmake:317 (message): pytorch is not compatible with `CMAKE_CUDA_ARCHITECTURES` and will ignore its value. Please configure `TORCH_CUDA_ARCH_LIST` instead. Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:873 (include) -- Added CUDA NVCC flags for: -gencode;arch=compute_120,code=sm_120 CMake Warning at cmake/Dependencies.cmake:95 (message): Not compiling with XPU. Could NOT find SYCL. Suppress this warning with -DUSE_XPU=OFF. Call Stack (most recent call first): CMakeLists.txt:873 (include) -- Building using own protobuf under third_party per request. -- Use custom protobuf build. CMake Warning at cmake/ProtoBuf.cmake:37 (message): Ancient protobuf forces CMake compatibility Call Stack (most recent call first): cmake/ProtoBuf.cmake:87 (custom_protobuf_find) cmake/Dependencies.cmake:107 (include) CMakeLists.txt:873 (include) CMake Deprecation Warning at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. -- -- 3.13.0.0 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Caffe2 protobuf include directory: $<BUILD_INTERFACE:E:/PyTorch_Build/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include> -- Trying to find preferred BLAS backend of choice: MKL -- MKL_THREADING = OMP -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- MKL_THREADING = OMP CMake Warning at cmake/Dependencies.cmake:213 (message): MKL could not be found. Defaulting to Eigen Call Stack (most recent call first): CMakeLists.txt:873 (include) CMake Warning at cmake/Dependencies.cmake:279 (message): Preferred BLAS (MKL) cannot be found, now searching for a general BLAS library Call Stack (most recent call first): CMakeLists.txt:873 (include) -- MKL_THREADING = OMP -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_sequential - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - libiomp5md - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - libiomp5md - pthread] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - pthread] -- Library mkl_intel: not found -- Checking for [mkl - guide - pthread - m] -- Library mkl: not found -- MKL library not found -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Checking for [Accelerate] -- Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND -- Checking for [vecLib] -- Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND -- Checking for [flexiblas] -- Library flexiblas: BLAS_flexiblas_LIBRARY-NOTFOUND -- Checking for [openblas] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m - gomp] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [libopenblas] -- Library libopenblas: BLAS_libopenblas_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran - pthread] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [acml - gfortran] -- Library acml: BLAS_acml_LIBRARY-NOTFOUND -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) -- Checking for [ptf77blas - atlas - gfortran] -- Library ptf77blas: BLAS_ptf77blas_LIBRARY-NOTFOUND -- Checking for [] -- Looking for sgemm_ -- Looking for sgemm_ - not found -- Cannot find a library with BLAS API. Not using BLAS. -- Using pocketfft in directory: E:/PyTorch_Build/pytorch/third_party/pocketfft/ CMake Deprecation Warning at third_party/pthreadpool/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at third_party/FXdiv/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at third_party/cpuinfo/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. -- The ASM compiler identification is MSVC CMake Warning (dev) at pytorch_env/Lib/site-packages/cmake/data/share/cmake-4.1/Modules/CMakeDetermineASMCompiler.cmake:234 (message): Policy CMP194 is not set: MSVC is not an assembler for language ASM. Run "cmake --help-policy CMP194" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): third_party/XNNPACK/CMakeLists.txt:18 (PROJECT) This warning is for project developers. Use -Wno-dev to suppress it. -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe -- Building for XNNPACK_TARGET_PROCESSOR: x86_64 -- Generating microkernels.cmake Duplicate microkernel definition: src\qs8-qc4w-packw\gen\qs8-qc4w-packw-x8c8-gemm-goi-avx256vnni.c and src\qs8-qc4w-packw\gen\qs8-qc4w-packw-x8c8-gemm-goi-avxvnni.c (1th function) Duplicate microkernel definition: src\qs8-qc4w-packw\gen\qs8-qc4w-packw-x8c8-gemm-goi-avxvnni.c and src\qs8-qc4w-packw\gen\qs8-qc4w-packw-x8c8-gemm-goi-scalar.c No microkernel found in src\reference\binary-elementwise.cc No microkernel found in src\reference\packing.cc No microkernel found in src\reference\unary-elementwise.cc -- Found Git: E:/Program Files/Git/cmd/git.exe (found version "2.51.0.windows.1") -- Google Benchmark version: v1.9.3, normalized to 1.9.3 -- Looking for shm_open in rt -- Looking for shm_open in rt - not found -- Performing Test HAVE_CXX_FLAG_WX -- Performing Test HAVE_CXX_FLAG_WX - Success -- Compiling and running to test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- success -- Compiling and running to test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile -- Compiling and running to test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- failed to compile -- Compiling and running to test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- success -- Compiling and running to test HAVE_PTHREAD_AFFINITY -- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile CMake Deprecation Warning at third_party/ittapi/CMakeLists.txt:7 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Warning at cmake/Dependencies.cmake:749 (message): FP16 is only cmake-2.8 compatible Call Stack (most recent call first): CMakeLists.txt:873 (include) CMake Deprecation Warning at third_party/FP16/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at third_party/psimd/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. -- Using third party subdirectory Eigen. -- Found Python: E:\PyTorch_Build\pytorch\pytorch_env\Scripts\python.exe (found version "3.10.10") found components: Interpreter Development.Module missing components: NumPy CMake Warning at cmake/Dependencies.cmake:826 (message): NumPy could not be found. Not building with NumPy. Suppress this warning with -DUSE_NUMPY=OFF Call Stack (most recent call first): CMakeLists.txt:873 (include) -- Using third_party/pybind11. -- pybind11 include dirs: E:/PyTorch_Build/pytorch/cmake/../third_party/pybind11/include -- Could NOT find OpenTelemetryApi (missing: OpenTelemetryApi_INCLUDE_DIRS) -- Using third_party/opentelemetry-cpp. -- opentelemetry api include dirs: E:/PyTorch_Build/pytorch/cmake/../third_party/opentelemetry-cpp/api/include -- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) -- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) CMake Warning at cmake/Dependencies.cmake:894 (message): Not compiling with MPI. Suppress this warning with -DUSE_MPI=OFF Call Stack (most recent call first): CMakeLists.txt:873 (include) -- MKL_THREADING = OMP -- Check OMP with lib C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/lib/x64/libomp.lib and flags -openmp:experimental -- MKL_THREADING = OMP -- Check OMP with lib C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/lib/x64/libomp.lib and flags -openmp:experimental -- Found OpenMP_C: -openmp:experimental -- Found OpenMP_CXX: -openmp:experimental -- Found OpenMP: TRUE -- Adding OpenMP CXX_FLAGS: -openmp:experimental -- Will link against OpenMP libraries: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/lib/x64/libomp.lib -- Found nvtx3: E:/PyTorch_Build/pytorch/third_party/NVTX/c/include -- ROCM_PATH environment variable is not set and C:/opt/rocm does not exist. Building without ROCm support. -- Found Python3: E:\PyTorch_Build\pytorch\pytorch_env\Scripts\python.exe (found version "3.10.10") found components: Interpreter -- ONNX_PROTOC_EXECUTABLE: $<TARGET_FILE:protobuf::protoc> -- Protobuf_VERSION: Protobuf_VERSION_NOTFOUND Generated: E:/PyTorch_Build/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.proto Generated: E:/PyTorch_Build/pytorch/build/third_party/onnx/onnx/onnx-operators_onnx_torch-ml.proto Generated: E:/PyTorch_Build/pytorch/build/third_party/onnx/onnx/onnx-data_onnx_torch.proto -- -- ******** Summary ******** -- CMake version : 4.1.0 -- CMake command : E:/PyTorch_Build/pytorch/pytorch_env/Lib/site-packages/cmake/data/bin/cmake.exe -- System : Windows -- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe -- C++ compiler version : 19.44.35215.0 -- CXX flags : /DWIN32 /D_WINDOWS /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL /EHsc /wd26812 -- Build type : Release -- Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1 -- CMAKE_PREFIX_PATH : E:\PyTorch_Build\pytorch\pytorch_env\Lib\site-packages;E:/Program Files/NVIDIA/CUNND/v9.12;E:\Program Files\NVIDIA\CUNND\v9.12;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- CMAKE_INSTALL_PREFIX : E:/PyTorch_Build/pytorch/torch -- CMAKE_MODULE_PATH : E:/PyTorch_Build/pytorch/cmake/Modules;E:/PyTorch_Build/pytorch/cmake/public/../Modules_CUDA_fix -- -- ONNX version : 1.18.0 -- ONNX NAMESPACE : onnx_torch -- ONNX_USE_LITE_PROTO : OFF -- USE_PROTOBUF_SHARED_LIBS : OFF -- ONNX_DISABLE_EXCEPTIONS : OFF -- ONNX_DISABLE_STATIC_REGISTRATION : OFF -- ONNX_WERROR : OFF -- ONNX_BUILD_TESTS : OFF -- BUILD_SHARED_LIBS : OFF -- -- Protobuf compiler : $<TARGET_FILE:protobuf::protoc> -- Protobuf includes : -- Protobuf libraries : -- ONNX_BUILD_PYTHON : OFF -- Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor -- Adding -DNDEBUG to compile flags -- Checking prototype magma_get_sgeqrf_nb for MAGMA_V2 -- Checking prototype magma_get_sgeqrf_nb for MAGMA_V2 - False -- MAGMA not found. Compiling without MAGMA support -- Could not find hardware support for NEON on this machine. -- No OMAP3 processor on this machine. -- No OMAP4 processor on this machine. -- MKL_THREADING = OMP -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_sequential - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - libiomp5md - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - libiomp5md - pthread] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - pthread] -- Library mkl_intel: not found -- Checking for [mkl - guide - pthread - m] -- Library mkl: not found -- MKL library not found -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Checking for [Accelerate] -- Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND -- Checking for [vecLib] -- Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND -- Checking for [flexiblas] -- Library flexiblas: BLAS_flexiblas_LIBRARY-NOTFOUND -- Checking for [openblas] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m - gomp] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [libopenblas] -- Library libopenblas: BLAS_libopenblas_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran - pthread] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [acml - gfortran] -- Library acml: BLAS_acml_LIBRARY-NOTFOUND -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) -- Checking for [ptf77blas - atlas - gfortran] -- Library ptf77blas: BLAS_ptf77blas_LIBRARY-NOTFOUND -- Checking for [] -- Cannot find a library with BLAS API. Not using BLAS. -- LAPACK requires BLAS -- Cannot find a library with LAPACK API. Not using LAPACK. -- MIOpen not found. Compiling without MIOpen support disabling ROCM because NOT USE_ROCM is set disabling MKLDNN because USE_MKLDNN is not set -- {fmt} version: 11.2.0 -- Build type: Release -- Using Kineto with CUPTI support -- Configuring Kineto dependency: -- KINETO_SOURCE_DIR = E:/PyTorch_Build/pytorch/third_party/kineto/libkineto -- KINETO_BUILD_TESTS = OFF -- KINETO_LIBRARY_TYPE = static -- CUDA_SOURCE_DIR = E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- CUDA_INCLUDE_DIRS = E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/include -- CUPTI_INCLUDE_DIR = E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/extras/CUPTI/include -- CUDA_cupti_LIBRARY = E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/extras/CUPTI/lib64/cupti.lib -- Found CUPTI CMake Deprecation Warning at third_party/kineto/libkineto/CMakeLists.txt:7 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Warning (dev) at third_party/kineto/libkineto/CMakeLists.txt:15 (find_package): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. -- Found PythonInterp: E:/PyTorch_Build/pytorch/pytorch_env/Scripts/python.exe (found version "3.10.10") -- ROCM_SOURCE_DIR = -- Kineto: FMT_SOURCE_DIR = E:/PyTorch_Build/pytorch/third_party/fmt -- Kineto: FMT_INCLUDE_DIR = E:/PyTorch_Build/pytorch/third_party/fmt/include -- CUPTI_INCLUDE_DIR = E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/extras/CUPTI/include -- ROCTRACER_INCLUDE_DIR = /include/roctracer -- DYNOLOG_INCLUDE_DIR = E:/PyTorch_Build/pytorch/third_party/kineto/libkineto/third_party/dynolog/ -- IPCFABRIC_INCLUDE_DIR = E:/PyTorch_Build/pytorch/third_party/kineto/libkineto/third_party/dynolog//dynolog/src/ipcfabric/ -- Configured Kineto -- Performing Test HAS/WD4624 -- Performing Test HAS/WD4624 - Success -- Performing Test HAS/WD4068 -- Performing Test HAS/WD4068 - Success -- Performing Test HAS/WD4067 -- Performing Test HAS/WD4067 - Success -- Performing Test HAS/WD4267 -- Performing Test HAS/WD4267 - Success -- Performing Test HAS/WD4661 -- Performing Test HAS/WD4661 - Success -- Performing Test HAS/WD4717 -- Performing Test HAS/WD4717 - Success -- Performing Test HAS/WD4244 -- Performing Test HAS/WD4244 - Success -- Performing Test HAS/WD4804 -- Performing Test HAS/WD4804 - Success -- Performing Test HAS/WD4273 -- Performing Test HAS/WD4273 - Success -- Performing Test HAS_WNO_STRINGOP_OVERFLOW -- Performing Test HAS_WNO_STRINGOP_OVERFLOW - Failed -- -- Architecture: x64 -- Use the C++ compiler to compile (MI_USE_CXX=ON) -- -- Library name : mimalloc -- Version : 2.2.4 -- Build type : release -- C++ Compiler : C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe -- Compiler flags : /Zc:__cplusplus -- Compiler defines : MI_CMAKE_BUILD_TYPE=release;MI_BUILD_RELEASE -- Link libraries : psapi;shell32;user32;advapi32;bcrypt -- Build targets : static -- CMake Error at CMakeLists.txt:1264 (add_subdirectory): The source directory E:/PyTorch_Build/pytorch/torch/headeronly does not contain a CMakeLists.txt file. -- don't use NUMA -- Looking for backtrace -- Looking for backtrace - not found -- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Autodetected CUDA architecture(s): 12.0 -- Autodetected CUDA architecture(s): 12.0 -- Autodetected CUDA architecture(s): 12.0 -- headers outputs: torch\csrc\inductor\aoti_torch\generated\c_shim_cpu.h not found torch\csrc\inductor\aoti_torch\generated\c_shim_aten.h not found torch\csrc\inductor\aoti_torch\generated\c_shim_cuda.h not found -- sources outputs: -- declarations_yaml outputs: -- Performing Test COMPILER_SUPPORTS_NO_AVX256_SPLIT -- Performing Test COMPILER_SUPPORTS_NO_AVX256_SPLIT - Failed -- Using ATen parallel backend: OMP -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) -- Check size of long double -- Check size of long double - done -- Performing Test COMPILER_SUPPORTS_FLOAT128 -- Performing Test COMPILER_SUPPORTS_FLOAT128 - Failed -- Performing Test COMPILER_SUPPORTS_SSE2 -- Performing Test COMPILER_SUPPORTS_SSE2 - Success -- Performing Test COMPILER_SUPPORTS_SSE4 -- Performing Test COMPILER_SUPPORTS_SSE4 - Success -- Performing Test COMPILER_SUPPORTS_AVX -- Performing Test COMPILER_SUPPORTS_AVX - Success -- Performing Test COMPILER_SUPPORTS_FMA4 -- Performing Test COMPILER_SUPPORTS_FMA4 - Success -- Performing Test COMPILER_SUPPORTS_AVX2 -- Performing Test COMPILER_SUPPORTS_AVX2 - Success -- Performing Test COMPILER_SUPPORTS_AVX512F -- Performing Test COMPILER_SUPPORTS_AVX512F - Success -- Found OpenMP_C: -openmp:experimental (found version "2.0") -- Found OpenMP_CXX: -openmp:experimental (found version "2.0") -- Found OpenMP_CUDA: -openmp (found version "2.0") -- Found OpenMP: TRUE (found version "2.0") -- Performing Test COMPILER_SUPPORTS_OPENMP -- Performing Test COMPILER_SUPPORTS_OPENMP - Success -- Performing Test COMPILER_SUPPORTS_OMP_SIMD -- Performing Test COMPILER_SUPPORTS_OMP_SIMD - Failed -- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES -- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES - Failed -- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH -- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH - Failed -- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM -- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM - Failed -- Configuring build for SLEEF-v3.8.0 Target system: Windows-10.0.26100 Target processor: AMD64 Host system: Windows-10.0.26100 Host processor: AMD64 Detected C compiler: MSVC @ C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe CMake: 4.1.0 Make program: E:/PyTorch_Build/pytorch/pytorch_env/Scripts/ninja.exe -- Using option `/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE ` to compile libsleef -- Building shared libs : OFF -- Building static test bins: OFF -- MPFR : LIB_MPFR-NOTFOUND -- GMP : LIBGMP-NOTFOUND -- RT : -- FFTW3 : LIBFFTW3-NOTFOUND -- OPENSSL : -- SDE : SDE_COMMAND-NOTFOUND -- COMPILER_SUPPORTS_OPENMP : FALSE AT_INSTALL_INCLUDE_DIR include/ATen/core core header install: E:/PyTorch_Build/pytorch/build/aten/src/ATen/core/aten_interned_strings.h core header install: E:/PyTorch_Build/pytorch/build/aten/src/ATen/core/enum_tag.h core header install: E:/PyTorch_Build/pytorch/build/aten/src/ATen/core/TensorBody.h CMake Error: File E:/PyTorch_Build/pytorch/torch/_utils_internal.py does not exist. CMake Error at caffe2/CMakeLists.txt:241 (configure_file): configure_file Problem configuring file CMake Error: File E:/PyTorch_Build/pytorch/torch/csrc/api/include/torch/version.h.in does not exist. CMake Error at caffe2/CMakeLists.txt:246 (configure_file): configure_file Problem configuring file -- NVSHMEM not found, not building with NVSHMEM support. CMake Error at caffe2/CMakeLists.txt:1398 (add_subdirectory): The source directory E:/PyTorch_Build/pytorch/torch does not contain a CMakeLists.txt file. CMake Warning at CMakeLists.txt:1285 (message): Generated cmake files are only fully tested if one builds with system glog, gflags, and protobuf. Other settings may generate files that are not well tested. -- -- ******** Summary ******** -- General: -- CMake version : 4.1.0 -- CMake command : E:/PyTorch_Build/pytorch/pytorch_env/Lib/site-packages/cmake/data/bin/cmake.exe -- System : Windows -- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe -- C++ compiler id : MSVC -- C++ compiler version : 19.44.35215.0 -- Using ccache if found : OFF -- CXX flags : /DWIN32 /D_WINDOWS /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DLIBKINETO_NOXPUPTI=ON -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273 -- Shared LD flags : /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 -- Static LD flags : /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 -- Module LD flags : /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 -- Build type : Release -- Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;ONNX_NAMESPACE=onnx_torch;_CRT_SECURE_NO_DEPRECATE=1;USE_EXTERNAL_MZCRC;MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS;EXPORT_AOTI_FUNCTIONS;WIN32_LEAN_AND_MEAN;_UCRT_LEGACY_INFINITY;NOMINMAX;USE_MIMALLOC -- CMAKE_PREFIX_PATH : E:\PyTorch_Build\pytorch\pytorch_env\Lib\site-packages;E:/Program Files/NVIDIA/CUNND/v9.12;E:\Program Files\NVIDIA\CUNND\v9.12;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- CMAKE_INSTALL_PREFIX : E:/PyTorch_Build/pytorch/torch -- USE_GOLD_LINKER : OFF -- -- TORCH_VERSION : 2.9.0 -- BUILD_STATIC_RUNTIME_BENCHMARK: OFF -- BUILD_BINARY : OFF -- BUILD_CUSTOM_PROTOBUF : ON -- Link local protobuf : ON -- BUILD_PYTHON : True -- Python version : 3.10.10 -- Python executable : E:\PyTorch_Build\pytorch\pytorch_env\Scripts\python.exe -- Python library : E:/Python310/libs/python310.lib -- Python includes : E:/Python310/Include -- Python site-package : E:\PyTorch_Build\pytorch\pytorch_env\Lib\site-packages -- BUILD_SHARED_LIBS : ON -- CAFFE2_USE_MSVC_STATIC_RUNTIME : OFF -- BUILD_TEST : True -- BUILD_JNI : OFF -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : OFF -- USE_BLAS : 0 -- USE_LAPACK : 0 -- USE_ASAN : OFF -- USE_TSAN : OFF -- USE_CPP_CODE_COVERAGE : OFF -- USE_CUDA : ON -- CUDA static link : OFF -- USE_CUDNN : OFF -- USE_CUSPARSELT : OFF -- USE_CUDSS : OFF -- USE_CUFILE : OFF -- CUDA version : 13.0 -- USE_FLASH_ATTENTION : OFF -- USE_MEM_EFF_ATTENTION : ON -- CUDA root directory : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- CUDA library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cuda.lib -- cudart library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cudart.lib -- cublas library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cublas.lib -- cufft library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cufft.lib -- curand library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/curand.lib -- cusparse library : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cusparse.lib -- nvrtc : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/nvrtc.lib -- CUDA include path : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/include -- NVCC executable : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe -- CUDA compiler : E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe -- CUDA flags : -DLIBCUDACXX_ENABLE_SIMPLIFIED_COMPLEX_OPERATIONS -Xcompiler /Zc:__cplusplus -Xcompiler /w -w -Xcompiler /FS -Xfatbin -compress-all -DONNX_NAMESPACE=onnx_torch --use-local-env -gencode arch=compute_120,code=sm_120 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --Werror cross-execution-space-call --no-host-device-move-forward --expt-relaxed-constexpr --expt-extended-lambda -Xcompiler=/wd4819,/wd4503,/wd4190,/wd4244,/wd4251,/wd4275,/wd4522 -Wno-deprecated-gpu-targets --expt-extended-lambda -DCUB_WRAPPED_NAMESPACE=at_cuda_detail -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -- CUDA host compiler : -- CUDA --device-c : OFF -- USE_TENSORRT : -- USE_XPU : OFF -- USE_ROCM : OFF -- BUILD_NVFUSER : -- USE_EIGEN_FOR_BLAS : ON -- USE_EIGEN_FOR_SPARSE : OFF -- USE_FBGEMM : OFF -- USE_KINETO : ON -- USE_GFLAGS : OFF -- USE_GLOG : OFF -- USE_LITE_PROTO : OFF -- USE_PYTORCH_METAL : OFF -- USE_PYTORCH_METAL_EXPORT : OFF -- USE_MPS : OFF -- CAN_COMPILE_METAL : -- USE_MKL : OFF -- USE_MKLDNN : OFF -- USE_UCC : OFF -- USE_ITT : ON -- USE_XCCL : OFF -- USE_NCCL : OFF -- Found NVSHMEM : -- USE_NNPACK : OFF -- USE_NUMPY : OFF -- USE_OBSERVERS : ON -- USE_OPENCL : OFF -- USE_OPENMP : ON -- USE_MIMALLOC : ON -- USE_MIMALLOC_ON_MKL : OFF -- USE_VULKAN : OFF -- USE_PROF : OFF -- USE_PYTORCH_QNNPACK : OFF -- USE_XNNPACK : ON -- USE_DISTRIBUTED : OFF -- Public Dependencies : -- Private Dependencies : Threads::Threads;pthreadpool;cpuinfo;XNNPACK;microkernels-prod;ittnotify;fp16;caffe2::openmp;fmt::fmt-header-only;kineto -- Public CUDA Deps. : -- Private CUDA Deps. : caffe2::curand;caffe2::cufft;caffe2::cublas;fmt::fmt-header-only;E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/lib/x64/cudart_static.lib;CUDA::cusparse;CUDA::cufft;CUDA::cusolver;ATEN_CUDA_FILES_GEN_LIB -- USE_COREML_DELEGATE : OFF -- BUILD_LAZY_TS_BACKEND : ON -- USE_ROCM_KERNEL_ASSERT : OFF -- Performing Test HAS_WMISSING_PROTOTYPES -- Performing Test HAS_WMISSING_PROTOTYPES - Failed -- Performing Test HAS_WERROR_MISSING_PROTOTYPES -- Performing Test HAS_WERROR_MISSING_PROTOTYPES - Failed -- Configuring incomplete, errors occurred! -- Checkout nccl release tag: v2.27.5-1 (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证构建 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -c "import torch; print(f'cuDNN version: {torch.backends.cudnn.version()}')" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'torch' has no attribute 'backends' (pytorch_env) PS E:\PyTorch_Build\pytorch> # 检查核心组件 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -c "import torch; >> print(f'PyTorch: {torch.__version__}'); >> print(f'CUDA available: {torch.cuda.is_available()}'); >> print(f'cuDNN: {torch.backends.cudnn.version()}'); >> print(f'MKL: {torch.__config__.mkl_is_available()}'); >> print(f'Libuv: {torch.distributed.is_available()}')" Traceback (most recent call last): File "<string>", line 2, in <module> AttributeError: module 'torch' has no attribute '__version__' (pytorch_env) PS E:\PyTorch_Build\pytorch>
09-02
PowerShell 7 环境已加载 (版本: 7.5.2) PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> <# >> Libuv 完整修复脚本 >> #> PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> $ErrorActionPreference = 'Stop' PS C:\Users\Administrator\Desktop> Set-StrictMode -Version 3 PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> try { >> $workingDir = "E:\PyTorch_Build\pytorch" >> $libuvBase = Join-Path $workingDir "third_party\libuv" >> $libDestDir = Join-Path $libuvBase "lib" >> >> # 1. 确保lib目录存在 >> New-Item -Path $libDestDir -ItemType Directory -Force -ErrorAction Stop | Out-Null >> >> # 2. 检查是否已有库文件 >> $existingLibs = Get-ChildItem -Path $libDestDir -Filter "uv*.lib" -File >> if ($existingLibs) { >> Write-Host "✅ 已找到库文件: $($existingLibs.FullName -join ', ')" -ForegroundColor Green >> $actualLibFile = $existingLibs[0].Name >> } >> else { >> Write-Host "未找到库文件,尝试从官方源下载..." -ForegroundColor Yellow >> >> # 3. 使用正确的下载URL >> $version = "1.51.0" >> $downloadUrl = "https://github.com/libuv/libuv/archive/refs/tags/v$version.zip" >> $tempZip = Join-Path $env:TEMP "libuv_source_$version.zip" >> >> # 下载源代码 >> Write-Host "正在下载Libuv源代码 (v$version)..." -ForegroundColor Cyan >> Invoke-WebRequest -Uri $downloadUrl -OutFile $tempZip -UseBasicParsing >> >> # 创建临时目录并解压 >> $tempExtract = Join-Path $env:TEMP "libuv_extract_$(Get-date -Format 'yyyyMMddHHmmss')" >> New-Item -ItemType Directory -Path $tempExtract -Force | Out-Null >> Expand-Archive -Path $tempZip -DestinationPath $tempExtract -Force >> >> # 查找并复制库文件(尝试构建目录) >> $buildDir = Join-Path $tempExtract "libuv-$version\out\build\x64-Release" >> $libFiles = Get-ChildItem -Path $buildDir -Recurse -Filter "uv*.lib" | >> Select-Object -First 1 >> >> if (-not $libFiles) { >> # 如果构建目录不存在,尝试手动构建 >> Write-Host "编译目录未找到,尝试构建Libuv..." -ForegroundColor Yellow >> $sourceDir = Join-Path $tempExtract "libuv-$version" >> $buildPath = Join-Path $sourceDir "build" >> New-Item -Path $buildPath -ItemType Directory -Force | Out-Null >> Set-Location $buildPath >> >> # 运行CMake生成构建文件 >> cmake .. -G "Visual Studio 17 2022" -A x64 >> cmake --build . --config Release >> >> $libFiles = Get-ChildItem -Path "$buildPath\Release" -Filter "uv*.lib" | >> Select-Object -First 1 >> } >> >> if ($libFiles) { >> Copy-Item -Path $libFiles.FullName -Destination $libDestDir -Force >> $actualLibFile = $libFiles.Name >> Write-Host "✅ 成功复制库文件: $actualLibFile" -ForegroundColor Green >> } >> else { >> throw "无法找到或生成库文件" >> } >> >> # 清理临时文件 >> Remove-Item $tempZip -Force -ErrorAction SilentlyContinue >> Remove-Item $tempExtract -Recurse -Force -ErrorAction SilentlyContinue >> } >> >> # 4. 更新CMake配置文件 >> $cmakeConfigPath = Join-Path $workingDir "cmake\Modules\FindLibuv.cmake" >> >> # 获取相对路径 >> $relativePath = $libuvBase.Replace($workingDir, "").TrimStart('\').Replace('\', '/') >> >> # 创建配置文件内容 >> $libuvConfig = @" >> # Libuv手动配置 >> set(LIBUV_FOUND ON) >> set(LIBUV_INCLUDE_DIRS "\${CMAKE_CURRENT_SOURCE_DIR}/$relativePath/include") >> set(LIBUV_LIBRARIES >> "\${CMAKE_CURRENT_SOURCE_DIR}/$relativePath/lib/$actualLibFile" >> ) >> "@ >> >> # 确保目录存在 >> $cmakeDir = Split-Path $cmakeConfigPath -Parent >> New-Item -Path $cmakeDir -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null >> >> Set-Content -Path $cmakeConfigPath -Value $libuvConfig -Encoding UTF8 >> Write-Host "✅ 更新CMake配置文件: $cmakeConfigPath" -ForegroundColor Green >> >> # 5. 最终验证 >> Write-Host "`n验证安装结果:" -ForegroundColor Cyan >> >> # 检查关键文件是否存在 >> $requiredFiles = @( >> Join-Path $libuvBase "include\uv.h", >> Join-Path $libDestDir $actualLibFile, >> $cmakeConfigPath >> ) >> >> $validationResult = $requiredFiles | ForEach-Object { >> if (Test-Path $_) { >> "✅ 存在: $_" >> } >> else { >> "❌ 缺失: $_" >> } >> } >> >> $validationResult | ForEach-Object { Write-Host $_ } >> >> if ($validationResult -contains "❌") { >> throw "部分文件缺失,请检查修复过程" >> } >> else { >> Write-Host "`n✅ Libuv 安装修复完成!" -ForegroundColor Green >> } >> } >> catch { >> Write-Host "`n❌ 修复失败: $_" -ForegroundColor Red >> Write-Host "错误详细信息: $($_.Exception.Message)" -ForegroundColor Yellow >> } ✅ 已找到库文件: E:\PyTorch_Build\pytorch\third_party\libuv\lib\uv.lib ❌ 修复失败: The variable '$CMAKE_CURRENT_SOURCE_DIR' cannot be retrieved because it has not been set. 错误详细信息: The variable '$CMAKE_CURRENT_SOURCE_DIR' cannot be retrieved because it has not been set. PS C:\Users\Administrator\Desktop> "PowerShell 7 环境已加载 (版本: 7.5.2) PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> # 切换到Libuv目录 PS C:\Users\Administrator\Desktop> Set-Location "E:\PyTorch_Build\pytorch\third_party\libuv" PS E:\PyTorch_Build\pytorch\third_party\libuv> PS E:\PyTorch_Build\pytorch\third_party\libuv> # 创建构建目录 PS E:\PyTorch_Build\pytorch\third_party\libuv> New-Item -Path "build" -ItemType Directory -Force Directory: E:\PyTorch_Build\pytorch\third_party\libuv Mode LastWriteTime Length Name ---- ------------- ------ ---- da--- 2025/9/1 0:27 build PS E:\PyTorch_Build\pytorch\third_party\libuv> Set-Location "build" PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 运行CMake生成构建文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> cmake .. -G "Visual Studio 17 2022" -A x64 -- summary of build options: Install prefix: C:/Program Files/libuv Target system: Windows Compiler: C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe (MSVC) CFLAGS: /DWIN32 /D_WINDOWS -- Configuring done (0.1s) -- Generating done (0.2s) -- Build files have been written to: E:/PyTorch_Build/pytorch/third_party/libuv/build PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 构建库文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> cmake --build . --config Release 适用于 .NET Framework MSBuild 版本 17.14.19+164abd434 1>Checking Build System Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt uv.vcxproj -> E:\PyTorch_Build\pytorch\third_party\libuv\build\Release\uv.dll Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt uv_a.vcxproj -> E:\PyTorch_Build\pytorch\third_party\libuv\build\Release\libuv.lib Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt uv_run_benchmarks_a.vcxproj -> E:\PyTorch_Build\pytorch\third_party\libuv\build\Release\uv_run_benchmarks_a.exe Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt uv_run_tests.vcxproj -> E:\PyTorch_Build\pytorch\third_party\libuv\build\Release\uv_run_tests.exe Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt uv_run_tests_a.vcxproj -> E:\PyTorch_Build\pytorch\third_party\libuv\build\Release\uv_run_tests_a.exe Building Custom Rule E:/PyTorch_Build/pytorch/third_party/libuv/CMakeLists.txt PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 复制生成的库文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Copy-Item "Release\uv.lib" "..\lib\" -Force PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 更新CMake配置文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $cmakeConfigPath = "E:\PyTorch_Build\pytorch\cmake\Modules\FindLibuv.cmake" PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $newContent = @' >> set(LIBUV_FOUND ON) >> set(LIBUV_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libuv/include") >> set(LIBUV_LIBRARIES >> "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libuv/lib/uv.lib" >> ) >> '@ PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Set-Content -Path $cmakeConfigPath -Value $newContent -Encoding UTF8 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Write-Host "✅ CMake配置文件已更新" -ForegroundColor Green ✅ CMake配置文件已更新 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 最终验证脚本 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $workingDir = "E:\PyTorch_Build\pytorch" PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $libuvBase = Join-Path $workingDir "third_party\libuv" PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 验证包含文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $headerStatus = if (Test-Path "$libuvBase\include\uv.h") {"✅ 存在"} else {"❌ 缺失"} PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Write-Host "uv.h: $headerStatus" -ForegroundColor $(if ($headerStatus -eq "✅ 存在") {"Green"} else {"Red"}) uv.h: ✅ 存在 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 验证库文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $libFiles = Get-ChildItem -Path "$libuvBase\lib" -Filter "uv*.lib" -File PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $libStatus = if ($libFiles) {"✅ 找到 $($libFiles.Count) 个库文件"} else {"❌ 缺失库文件"} PropertyNotFoundException: The property 'Count' cannot be found on this object. Verify that the property exists. PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Write-Host "库文件: $libStatus" -ForegroundColor $(if ($libFiles) {"Green"} else {"Red"}) 库文件: ✅ 找到 个库文件 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> if ($libFiles) { >> Write-Host "库文件名: $($libFiles.Name)" -ForegroundColor Cyan >> } 库文件名: uv.lib PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 验证CMake配置 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $cmakeConfigPath = Join-Path $workingDir "cmake\Modules\FindLibuv.cmake" PS E:\PyTorch_Build\pytorch\third_party\libuv\build> $cmakeStatus = if (Test-Path $cmakeConfigPath) {"✅ 存在"} else {"❌ 缺失"} PS E:\PyTorch_Build\pytorch\third_party\libuv\build> Write-Host "CMake配置: $cmakeStatus" -ForegroundColor $(if ($cmakeStatus -eq "✅ 存在") {"Green"} else {"Red"}) CMake配置: ✅ 存在 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 显示配置内容 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> if (Test-Path $cmakeConfigPath) { >> Write-Host "`nCMake配置内容:" -ForegroundColor Cyan >> Get-Content $cmakeConfigPath >> } CMake配置内容: set(LIBUV_FOUND ON) set(LIBUV_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libuv/include") set(LIBUV_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libuv/lib/uv.lib" ) PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 查看可用生成器 PS E:\PyTorch_Build\pytorch\third_party\libuv\build> cmake -G CMake Error: No generator specified for -G Generators * Visual Studio 17 2022 = Generates Visual Studio 2022 project files. Use -A option to specify architecture. Visual Studio 16 2019 = Generates Visual Studio 2019 project files. Use -A option to specify architecture. Visual Studio 15 2017 = Generates Visual Studio 2017 project files. Use -A option to specify architecture. Visual Studio 14 2015 = Generates Visual Studio 2015 project files. Use -A option to specify architecture. Borland Makefiles = Generates Borland makefiles. NMake Makefiles = Generates NMake makefiles. NMake Makefiles JOM = Generates JOM makefiles. MSYS Makefiles = Generates MSYS makefiles. MinGW Makefiles = Generates a make file for use with mingw32-make. Green Hills MULTI = Generates Green Hills MULTI files (experimental, work-in-progress). Unix Makefiles = Generates standard UNIX makefiles. Ninja = Generates build.ninja files. Ninja Multi-Config = Generates build-<Config>.ninja files. Watcom WMake = Generates Watcom WMake makefiles. CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files (deprecated). CodeBlocks - NMake Makefiles = Generates CodeBlocks project files (deprecated). CodeBlocks - NMake Makefiles JOM = Generates CodeBlocks project files (deprecated). CodeBlocks - Ninja = Generates CodeBlocks project files (deprecated). CodeBlocks - Unix Makefiles = Generates CodeBlocks project files (deprecated). CodeLite - MinGW Makefiles = Generates CodeLite project files (deprecated). CodeLite - NMake Makefiles = Generates CodeLite project files (deprecated). CodeLite - Ninja = Generates CodeLite project files (deprecated). CodeLite - Unix Makefiles = Generates CodeLite project files (deprecated). Eclipse CDT4 - NMake Makefiles = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - MinGW Makefiles = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files (deprecated). Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files (deprecated). Kate - MinGW Makefiles = Generates Kate project files (deprecated). Kate - NMake Makefiles = Generates Kate project files (deprecated). Kate - Ninja = Generates Kate project files (deprecated). Kate - Ninja Multi-Config = Generates Kate project files (deprecated). Kate - Unix Makefiles = Generates Kate project files (deprecated). Sublime Text 2 - MinGW Makefiles = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - NMake Makefiles = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - Ninja = Generates Sublime Text 2 project files (deprecated). Sublime Text 2 - Unix Makefiles = Generates Sublime Text 2 project files (deprecated). PS E:\PyTorch_Build\pytorch\third_party\libuv\build> PS E:\PyTorch_Build\pytorch\third_party\libuv\build> # 使用正确的生成器,例如: PS E:\PyTorch_Build\pytorch\third_party\libuv\build> cmake .. -G "Visual Studio 16 2019" -A x64 CMake Error: Error: generator : Visual Studio 16 2019 Does not match the generator used previously: Visual Studio 17 2022 Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. PS E:\PyTorch_Build\pytorch\third_party\libuv\build> "
09-02
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值