您好,登錄后才能下訂單哦!
今天小編給大家分享一下Windows下源碼編譯PaddlePaddle的方法是什么的相關(guān)知識點,內(nèi)容詳細(xì),邏輯清晰,相信大部分人都還太了解這方面的知識,所以分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后有所收獲,下面我們一起來了解一下吧。
Windows 10 專業(yè)版 (64bit)
Python 版本 Python 3.9.16(64 bit)
Visual Studio2022 專業(yè)版
cmake --version
cmake version 3.25.1-msvc1 CMake suite maintained and supported by Kitware (kitware.com/cmake).
(p2) PS D:\Paddle> python --version Python 3.9.16
(p2) PS D:\Paddle> nvidia-smi Wed Apr 5 17:06:19 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 516.94 Driver Version: 516.94 CUDA Version: 11.7 |
(p2) PS D:\Paddle> pip install numpy protobuf wheel ninja Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: numpy in i:\miniconda3\envs\p2\lib\site-packages (1.23.2) Requirement already satisfied: protobuf in i:\miniconda3\envs\p2\lib\site-packages (3.20.3) Requirement already satisfied: wheel in i:\miniconda3\envs\p2\lib\site-packages (0.38.4) Requirement already satisfied: ninja in i:\miniconda3\envs\p2\lib\site-packages (1.11.1)
mkdir D:\workspace && cd /d D:\workspace git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle
********************************************************************** ** Visual Studio 2022 Developer Command Prompt v17.5.3 ** Copyright (c) 2022 Microsoft Corporation ********************************************************************** C:\Program Files\Microsoft Visual Studio\2022\Professional>d: D:\>cd Paddle D:\Paddle>
先編譯CPU版本吧,因為GPU的cuda和cudnn環(huán)境變量不會寫(偷懶用conda安裝的)
cmake .. -GNinja -DWITH_GPU=OFF -DWITH_UNITY_BUILD=ON ninja
編譯過程中會下載東西,所以建議不要斷網(wǎng)。 此過程中:
特別費(fèi)CPU,我的到了100%,風(fēng)扇呼呼的;
內(nèi)存使用不大,10GB左右沒變過;
不斷使用git下載,所以網(wǎng)速要好。
docker run --name paddle-test -v 123456:/paddle --network=host -it registry.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash
3 times. CMake Error at /paddle/build/third_party/dlpack/tmp/extern_dlpack-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/dmlc/dlpack.git' CMakeFiles/extern_dlpack.dir/build.make:91: recipe for target 'third_party/dlpack/src/extern_dlpack-stamp/extern_dlpack-download' failed make[2]: *** [third_party/dlpack/src/extern_dlpack-stamp/extern_dlpack-download] Error 1 CMakeFiles/Makefile2:4791: recipe for target 'CMakeFiles/extern_dlpack.dir/all' failed make[1]: *** [CMakeFiles/extern_dlpack.dir/all] Error 2 fatal: unable to access 'https://github.com/JuliaStrings/utf8proc.git/': Failed to connect to github.com port 443: Connection refused -- Had to git clone more than once: 3 times. CMake Error at /paddle/build/third_party/utf8proc/tmp/extern_utf8proc-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/JuliaStrings/utf8proc.git' CMakeFiles/extern_utf8proc.dir/build.make:90: recipe for target 'third_party/utf8proc/src/extern_utf8proc-stamp/extern_utf8proc-download' failed make[2]: *** [third_party/utf8proc/src/extern_utf8proc-stamp/extern_utf8proc-download] Error 1 CMakeFiles/Makefile2:4818: recipe for target 'CMakeFiles/extern_utf8proc.dir/all' failed
以上就是“Windows下源碼編譯PaddlePaddle的方法是什么”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家閱讀完這篇文章都有很大的收獲,小編每天都會為大家更新不同的知識,如果還想學(xué)習(xí)更多的知識,請關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。