{"id":19004,"date":"2025-04-19T01:22:21","date_gmt":"2025-04-18T17:22:21","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/19004.html"},"modified":"2025-04-19T01:22:21","modified_gmt":"2025-04-18T17:22:21","slug":"%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%9a%e6%98%87%e8%85%beaarch64%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85cudagcccmake%ef%bc%8c%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85pytorch%ef%bc%8c%e5%8d%8e","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/19004.html","title":{"rendered":"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b"},"content":{"rendered":"<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e00\u3001\u5b89\u88c5CUDA\u548ccudnn<\/li>\n<li>\n<ul>\n<li>1.1\u3001\u4e0b\u8f7dCUDA\u9a71\u52a8<\/li>\n<li>1.2\u3001\u5b89\u88c5CUDA\u9a71\u52a8<\/li>\n<li>1.3\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/li>\n<li>1.4\u3001\u5b89\u88c5cudnn<\/li>\n<li>1.5\u3001\u5b89\u88c5magma-cuda<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u5b89\u88c5gcc\u7f16\u8bd1\u5668<\/li>\n<li>\u4e09\u3001\u5b89\u88c5CMake<\/li>\n<li>\u56db\u3001\u5b89\u88c5NCCL<\/li>\n<li>\u4e94\u3001\u7f16\u8bd1\u5b89\u88c5Pytorch<\/li>\n<li>\n<ul>\n<li>5.1\u3001\u524d\u63d0\u51c6\u5907<\/li>\n<li>5.2\u3001\u4e0b\u8f7dpytorch\u6e90\u7801<\/li>\n<li>5.3\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/li>\n<li>5.4\u3001Pytorch\u7f16\u8bd1\u5b89\u88c5<\/li>\n<li>5.5\u3001\u6d4b\u8bd5Pytorch<\/li>\n<\/ul>\n<\/li>\n<li>\u7279\u522b\u9e23\u8c22\u4ee5\u4e0b\u535a\u5ba2<\/li>\n<\/ul>\n<p>\u6700\u8fd1\u62ff\u5230\u4e00\u53f0\u6607\u817eaarch64\u670d\u52a1\u5668&#xff0c;\u663e\u5361\u4e3aA100&#xff0c;\u975e\u5e38\u96be\u5f97&#xff0c;\u4f46\u662f\u4e0e\u5e73\u5e38\u914d\u7f6e\u73af\u5883\u4e0d\u540c&#xff0c;\u670d\u52a1\u5668\u5b58\u5728\u4e09\u5927\u96be\u9898&#xff1a;<\/p>\n<li>\u7531\u4e8e\u5b89\u5168\u63a7\u5236&#xff0c;\u670d\u52a1\u5668\u672c\u8eab\u4e0d\u80fd\u8bbf\u95ee\u5916\u7f51&#xff1b;<\/li>\n<li>\u670d\u52a1\u5668\u672c\u8eab\u4e3aARM\u67b6\u6784&#xff08;aarch64&#xff09;&#xff0c;\u7f51\u4e0a\u6240\u6709\u955c\u50cf\u6e90\u7684ARM\u7248\u672cPytorch\u5b89\u88c5\u5305\u5747\u4e3aCPU\u7248&#xff0c;\u65e0\u6cd5\u4f7f\u7528CUDA&#xff1b;<\/li>\n<li>\u6ca1\u6709\u7ba1\u7406\u5458\u6743\u9650&#xff0c;\u53ea\u62ff\u5230\u975eRoot\u7528\u6237&#xff1b;<\/li>\n<p>\u5728\u7ecf\u8fc7\u4e866*12&#043;\u5c0f\u65f6\u7684\u4e0d\u65ad\u5b9e\u8df5\u3001\u8bd5\u9519\u3001\u6392\u9519\u3001\u8be2\u95ee\u5927\u4f6c\u3001\u5bfb\u627e\u89e3\u51b3\u65b9\u6848\u3001\u91cd\u5934\u6765\u8fc7\u7b49\u7b49\u8fc7\u7a0b\u540e&#xff0c;\u603b\u7ed3\u4e86\u4e00\u5957\u5728\u6607\u817eaarch64\u670d\u52a1\u5668\u7f16\u8bd1\u5b89\u88c5\u652f\u6301GPU\u7684Pytorch\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u8bb0\u5f55\u5728\u6b64\u3002<\/p>\n<p>\u7f16\u8bd1\u5b89\u88c5Pytorch\u9700\u8981\u6781\u9ad8\u7684\u8010\u5fc3\u548c\u8f83\u5f3a\u7684\u52a8\u624b\u80fd\u529b&#xff0c;\u5728\u52a8\u624b\u4e4b\u524d&#xff0c;\u4f60\u8fd8\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u6761\u4ef6<\/p>\n<li>\u719f\u7ec3\u64cd\u4f5c\u4e00\u79cdssh\u5de5\u5177&#xff0c;\u5982MobaXtem&#xff0c;\u80fd\u591f\u901a\u8fc7ssh\u8fde\u63a5\u670d\u52a1\u5668&#xff0c;\u80fd\u8bfb\u61c2Linux\u7cfb\u7edf\u57fa\u672c\u7ec8\u7aef\u547d\u4ee4&#xff1b;<\/li>\n<li>\u767b\u5f55\u7684\u670d\u52a1\u5668\u8282\u70b9\u5177\u5907\u663e\u5361&#xff1b;<\/li>\n<li>\u5177\u5907\u8bbf\u95ee\u67d0\u4e9b\u7f51\u7ad9\u7684\u80fd\u529b&#xff1b;<\/li>\n<li>\u4e00\u9897\u52c7\u6562\u7684\u5fc3\u3002<\/li>\n<h2>\u4e00\u3001\u5b89\u88c5CUDA\u548ccudnn<\/h2>\n<h3>1.1\u3001\u4e0b\u8f7dCUDA\u9a71\u52a8<\/h3>\n<p>1.\u9996\u5148\u67e5\u770b\u7cfb\u7edf\u7684cuda\u9a71\u52a8&#xff0c;\u53ef\u4ee5\u770b\u5230\u8fd9\u91cc\u662f12.3\u7248\u672c&#xff0c;\u6240\u4ee5\u6211\u4eec\u8981\u4e0b\u8f7d\u6bd4\u5176\u4f4e\u7684CUDA&#xff0c;\u63a8\u835011.8\u7248\u672c\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172214-68028a46c18ca.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7136\u540e\u8f93\u51fanvcc &#8211;verison&#xff0c;\u5982\u679c\u662fcommand not found\u8bf4\u660e\u6ca1\u6709CUDA\u9a71\u9700\u8981\u5b89\u88c5&#xff0c;\u5982\u679c\u8f93\u51fa\u4e86\u4e00\u5927\u5806\u578b\u53f7\u4fe1\u606f\u4e14\u7248\u672c\u4f4e\u4e8e\u4e0a\u56fe\u7684CUDA \u9a71\u52a8\u7248\u672c&#xff0c;\u8bf4\u660e\u6709CUDA\u4e14\u7248\u672c\u6b63\u786e&#xff0c;\u5c31\u4e0d\u8981\u518d\u5b89\u88c5\u4e86&#xff0c;\u8df3\u5230#\u4e8c\u6b65\u9aa4\u3002<\/p>\n<p>2.\u8fdb\u5165CUDA\u5b98\u7f51&#xff0c;\u6839\u636e\u7cfb\u7edf\u7248\u672c\u9009\u62e9\u5bf9\u5e94\u7684runfile&#xff0c;\u6ce8\u610f\u56e0\u4e3a\u662f\u975eroot\u7528\u6237&#xff0c;\u4e0d\u8981\u7528sudo\u7684rpm\u5b89\u88c5&#xff0c;\u53ea\u80fd\u9009\u62e9\u4e0b\u8f7drunfile\u7528sh\u5b89\u88c5&#xff0c;\u56e0\u4e3a\u5176\u4ed6\u7248\u672c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u624d\u884c&#xff0c;&#xff08;\u5982\u679c\u4e0d\u77e5\u9053\u673a\u5668\u662f\u4ec0\u4e48\u7248\u672c&#xff0c;\u53ef\u4ee5\u4f7f\u7528uname -m\u67e5\u770b\u67b6\u6784&#xff09;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172215-68028a471951f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u53ef\u4ee5\u4f7f\u7528wget\u4e0b\u8f7d&#xff1a;wget https:\/\/developer.download.nvidia.com\/compute\/cuda\/11.8.0\/local_installers\/cuda_11.8.0_520.61.05_linux_sbsa.run \u5982\u679c\u6ca1\u6709\u5916\u7f51\u73af\u5883\u7528\u4e0d\u4e86wget&#xff0c;\u4f7f\u7528\u672c\u673a\u4e0b\u8f7d\u8fd9\u4e2a.run\u6587\u4ef6\u540e&#xff0c;\u7136\u540e\u4f20\u5230\u670d\u52a1\u5668&#xff0c;\u4f7f\u7528sh\u5b89\u88c5\u3002<\/p>\n<h3>1.2\u3001\u5b89\u88c5CUDA\u9a71\u52a8<\/h3>\n<p>\u5982\u679c\u662f\u975eroot\u7528\u6237&#xff0c;\u7ec8\u7aefcd\u8fdb\u5165\u4e0b\u8f7d\u597d.run\u6587\u4ef6\u7684\u76ee\u5f55&#xff0c;\u4f7f\u7528sh\u5b89\u88c5&#xff1a;sh cuda_11.8.0_520.61.05_linux_sbsa.run \u9996\u5148\u4f1a\u5f39\u51fa\u95ee\u4f60\u63a5\u4e0d\u63a5\u53d7\u4e00\u4e2a\u534f\u8bae&#xff0c;\u8f93\u5165accept&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a4800eaf.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7136\u540e\u56de\u5f39\u51fa\u5b89\u88c5\u914d\u7f6e&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a481e7d6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u2191\u2193\u8fdb\u884c\u4e0a\u4e0b&#xff0c;\u2190\u2192\u8fdb\u884c\u6269\u5c55&#xff0c;enter\u8fdb\u884c\u9009\u62e9\u548c\u53d6\u6d88&#xff0c;A\u8fdb\u884c\u6269\u5c55\u9009\u9879 \u6211\u4eec\u53d6\u6d88\u6389Driver\u9009\u9879&#xff0c;\u56e0\u4e3a\u673a\u5668\u5df2\u7ecf\u5b89\u88c5\u4e86Driver&#xff0c;\u53ea\u5b89\u88c5CUDA Toolkit\u548cCUDA documentation&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a4855255.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7136\u540e\u9009\u62e9\u9009\u4e2dOptions&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a48869a6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8fdb\u5165Toolkit Options&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a48ba6ff.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \/usr\u8fd9\u79cd\u975e\u7528\u6237\u76ee\u5f55\u7684\u9009\u9879\u90fd\u8981\u53bb\u6389&#xff0c;\u6211\u8fd9\u91cc\u5168\u53bb\u6389\u4e86&#xff0c;\u53e6\u5916\u8fdb\u5165 Change Toolkit Install Path\u8bbe\u7f6ecuda\u5b89\u88c5\u5230\u81ea\u5df1\u5177\u6709\u5199\u5165\u6743\u9650\u7684\u8def\u5f84&#xff08;\u4e00\u5b9a\u8981\u662f\u81ea\u5df1\u7684\u76ee\u5f55&#xff0c;\u63d0\u524d\u5efa\u597d\u6587\u4ef6\u5939&#xff0c;\u4e0d\u7136\u4f60\u5b89\u4e0d\u4e86&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172216-68028a48f14ab.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u505a\u5b8cDone&#xff0c;\u56de\u5230Options\u83dc\u5355&#xff0c; \u66f4\u6539Library install path (\u4e0d\u6539\u4e0d\u884c&#xff0c;\u5b83\u4f1a\u5077\u5077\u5199\u5165\/var\/lib) <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172217-68028a492d649.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u540c\u6837\u8bbe\u7f6e\u5b89\u88c5\u5230\u81ea\u5df1\u5177\u6709\u5199\u5165\u6743\u9650\u7684\u8def\u5f84&#xff08;\u540c\u6837\u4e00\u5b9a\u8981\u662f\u81ea\u5df1\u7684\u76ee\u5f55&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172217-68028a4962bba.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u914d\u7f6e\u597d\u4ee5\u4e0a\u4e24\u4e2a\u81ea\u5b9a\u4e49\u76ee\u5f55\u540e&#xff0c;\u9009\u62e9Done&#xff0c;\u7b49\u5f85\u7247\u523b\u4f1a\u51fa\u73b0\u4e00\u4e2asummary&#xff0c;\u8bf4\u660e\u5b89\u88c5\u6210\u529f&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172217-68028a499538d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5e76\u4e14\u80fd\u5728\u6587\u4ef6\u76ee\u5f55\u4e2d\u770b\u5230cuda\u91cc\u7684\u6587\u4ef6\u90fd\u5df2\u7ecf\u5b89\u88c5\u597d\u4e86&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172217-68028a49d98f3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.3\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<p>\u5b89\u88c5\u597d\u540e\u8fd8\u4e0d\u80fd\u4f7f\u7528nvcc &#8211;V&#xff0c;\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf&#xff1a; \u8f93\u5165 vim ~\/.bashrc\u8fdb\u5165\u73af\u5883\u53d8\u91cf&#xff0c;\u8fdb\u884c\u66f4\u6539&#xff1a;<\/p>\n<p><span class=\"token comment\"># CUDA<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">PATH<\/span><\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/\u521a\u521a\u7684\u8def\u5f84\/cuda-10.1\/bin:<span class=\"token environment constant\">$PATH<\/span>&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">LD_LIBRARY_PATH<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/\u521a\u521a\u7684\u8def\u5f84\/cuda-11.8\/lib64:\/\u521a\u521a\u7684\u8def\u5f84\/cuda-11.8\/mylib\/lib64:<span class=\"token variable\">$LD_LIBRARY_PATH<\/span>&#034;<\/span><\/p>\n<p>\u8def\u5f84\u8981\u8bb0\u5f97\u6362\u6210\u81ea\u5df1\u7684&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172218-68028a4a02c99.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6dfb\u52a0\u597d\u540e&#xff0c;\u8f93\u5165wq!\u4fdd\u5b58&#xff0c;\u7136\u540e\u5237\u65b0\u73af\u5883\u53d8\u91cf&#xff1a;source ~\/.profile<\/p>\n<p>\u6700\u540e\u6d4b\u8bd5CUDA&#xff0c;\u8f93\u5165nvcc -V&#xff0c;\u5982\u679c\u663e\u793a\u4e86\u7248\u672c\u53f7&#xff0c;\u5219\u606d\u559c\u5927\u83b7\u6210\u529f&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172218-68028a4a5b77c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>1.4\u3001\u5b89\u88c5cudnn<\/h3>\n<p>\u8fd9\u91cc\u53c2\u8003\u4e86&#xff1a;https:\/\/blog.csdn.net\/YY007H\/article\/details\/134772564<\/p>\n<h3>1.5\u3001\u5b89\u88c5magma-cuda<\/h3>\n<p>magma-cuda\u4e3b\u8981\u7528\u4e8e\u5927\u89c4\u6a21\u7ebf\u6027\u4ee3\u6570\u8ba1\u7b97\u548cGPU\u52a0\u901f\u3002<\/p>\n<p>\u9996\u5148\u8fdb\u5165anaconda\u5b98\u65b9\u7f51\u7ad9&#xff1a;https:\/\/anaconda.org\/search?q&#061;magma&#xff0c;\u9009\u62e9\u81ea\u5df1\u5bf9\u5e94CUDA\u7248\u672c\u7684\u5b89\u88c5\u5305&#xff0c;\u5982\u679c\u662fCUDA11.8\u5c31\u627emagma-cuda118&#xff0c;\u540e\u9762\u7684\u7248\u672c\u53f7\u5c31\u662f\u5bf9\u5e94\u7684CUDA\u53f7&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172218-68028a4a7b1a0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c06\u5176\u4e0b\u8f7d\u540e&#xff0c;\u8fc1\u79fb\u5230Anaconda\u5b89\u88c5\u76ee\u5f55\u7684pkgs\u76ee\u5f55\u4e0b&#xff08;\u56e0\u4e3a\u6ce8conda install \u7f13\u5b58\u6587\u4ef6\u8def\u5f84\u4e00\u822c\u5c31\u662fanaconda\/pkgs&#xff09;&#xff0c;\u5982\u679c\u4e0b\u8f7d\u7684\u5305\u540d\u662flinux-64_\u5f00\u5934\u7684&#xff0c;\u8981\u91cd\u547d\u540d\u628alinux-64_\u53bb\u9664&#xff0c;\u4ee5\u5305\u540d\u5f00\u5934&#xff0c;\u4e0d\u7136conda\u8bc6\u522b\u4e0d\u5230\u3002\u7136\u540e\u4f7f\u7528\u7ec8\u7aefcd\u5230pkgs\u76ee\u5f55\u90a3\u91cc&#xff0c;\u8f93\u5165&#xff1a;<\/p>\n<p>conda <span class=\"token function\">install<\/span> &#8211;use-local \u5305\u540d.tar.bz2<\/p>\n<p>\u7b49\u5f85\u7247\u523b&#xff0c;\u5b89\u88c5\u5b8c\u6210\u540e\u8f93\u5165conda list\u5c31\u53ef\u4ee5\u770b\u5230\u5305\u540d\u4e86&#xff0c;\u5982\u679c\u770b\u4e0d\u5230\u5305\u540d\u7684\u8bdd\u5927\u6982\u7387\u662f\u5305\u540d\u7684\u95ee\u9898&#xff0c;\u6bd4\u5982linux-64_magma-cuda118-2.6.1-1.tar.bz2\u8981\u6539\u6210magma-cuda118-2.6.1-1.tar.bz2\u3002<\/p>\n<h2>\u4e8c\u3001\u5b89\u88c5gcc\u7f16\u8bd1\u5668<\/h2>\n<p>\u9996\u5148\u6d4b\u8bd5\u4e0b\u673a\u5668\u6709\u6ca1\u6709gcc&#xff0c;\u8f93\u5165gcc -v&#xff0c;\u5982\u679c\u51fa\u73b0\u4ee5\u4e0b\u63d0\u793a&#xff0c;\u8bf4\u660e\u6709gcc&#xff0c;\u8be5\u7248\u672c\u4e3a10.3.1&#xff0c;\u5c31\u4e0d\u7528\u518d\u5b89\u88c5\u4e86&#xff0c;\u4f46\u5982\u679c\u4f4e\u4e8e10\u7248\u672c\u5219\u5fc5\u987b\u5347\u7ea7gcc\u7248\u672c\u3002\u5230#\u4e09\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172218-68028a4ad56ee.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8fd9\u91cc\u53ef\u4ee5\u53c2\u8003\u8fd9\u4e24\u7bc7\u535a\u5ba2\u5b89\u88c5\u597d\u76f8\u5e94\u73af\u5883&#xff1a; https:\/\/zhuanlan.zhihu.com\/p\/659247505&#xff08;\u63a8\u8350&#xff09; https:\/\/blog.csdn.net\/qq_36393978\/article\/details\/118678521<\/p>\n<p>\u5b89\u88c5gcc\u7684\u65f6\u95f4\u6781\u5176\u6f2b\u957f&#xff0c;make\u7684\u65f6\u5019\u4e00\u822c\u8981\u81f3\u5c114\u4e2a\u5c0f\u65f6&#xff0c;\u6211\u5b9e\u6d4b\u4e3a6\u5c0f\u65f6&#xff0c;\u6240\u4ee5\u5f97\u63d0\u524d\u505a\u597d\u51c6\u5907\u3002<\/p>\n<h2>\u4e09\u3001\u5b89\u88c5CMake<\/h2>\n<p>\u5728\u7f16\u8bd1\u5b89\u88c5Pytorch\u4e4b\u524d&#xff0c;\u9700\u8981\u8981\u6709CMake\u7f16\u8bd1\u6784\u5efa\u5de5\u5177\u3002<\/p>\n<p>CMake\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u8de8\u5e73\u53f0\u6784\u5efa\u5de5\u5177&#xff0c;\u7528\u4e8e\u7ba1\u7406\u8f6f\u4ef6\u6784\u5efa\u8fc7\u7a0b\u4e2d\u7684\u914d\u7f6e\u3001\u7f16\u8bd1\u548c\u5b89\u88c5\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u6d01\u7684\u8de8\u5e73\u53f0\u8bed\u8a00&#xff08;CMakeLists.txt&#xff09;\u6765\u63cf\u8ff0\u6784\u5efa\u8fc7\u7a0b\u7684\u89c4\u5219&#xff0c;\u5e76\u901a\u8fc7\u751f\u6210\u4e0e\u76ee\u6807\u5f00\u53d1\u73af\u5883\u517c\u5bb9\u7684\u6784\u5efa\u6587\u4ef6&#xff08;\u5982Makefile \u6216 Visual Studio \u89e3\u51b3\u65b9\u6848&#xff09;\u6765\u5b8c\u6210\u5b9e\u9645\u7684\u6784\u5efa\u8fc7\u7a0b\u3002<\/p>\n<p>\u9996\u5148\u8fdb\u5165CMake\u5b98\u7f51&#xff1a;https:\/\/cmake.org\/download\/&#xff0c;\u627e\u5230\u7b26\u5408\u7cfb\u7edf\u67b6\u6784\u7684.tar.gz\u683c\u5f0f\u7684\u5b89\u88c5\u5305&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172219-68028a4b189b0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8fd9\u91cc\u9009\u62e9\u4e86aarch64\u76843.27.9\u5b89\u88c5\u5305&#xff0c;\u5e76\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u8fdb\u884c\u89e3\u538b&#xff1a;<\/p>\n<p><span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-zxvf<\/span> cmake-3.27.9-linux-aarch64.tar.gz<\/p>\n<p>\u89e3\u538b\u4e4b\u540e&#xff0c;\u5c06\u89e3\u538b\u540e\u7684\u76ee\u5f55\u6539\u540d\u4e3aCMake\u65b9\u4fbf\u7f16\u5199\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u6700\u540e\u4e00\u6b65&#xff0c;\u6253\u5f00\u73af\u5883\u53d8\u91cf\u6587\u4ef6&#xff0c;\u5982vim ~\/.bashrc&#xff0c;\u5728\u73af\u5883\u53d8\u91cf\u7684\u6700\u540e\u52a0\u5165\u4e00\u884c\u5373\u53ef&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\"><span class=\"token environment constant\">PATH<\/span><\/span><span class=\"token operator\">&#061;<\/span>\u4f60\u7684\u8def\u5f84\/cmake\/bin:<span class=\"token environment constant\">$PATH<\/span><\/p>\n<p>\u7136\u540e\u8f93\u5165cmake &#8211;version&#xff0c;\u5982\u679c\u51fa\u73b0\u7248\u672c\u53f7\u8bf4\u660eCMake\u5b89\u88c5\u6210\u529f&#xff01;<\/p>\n<h2>\u56db\u3001\u5b89\u88c5NCCL<\/h2>\n<p>\u8fd9\u91cc\u5b8c\u5168\u53c2\u8003\u8fd9\u7bc7\u535a\u5ba2&#xff1a;https:\/\/blog.csdn.net\/Scenery0519\/article\/details\/128081062<\/p>\n<p>\u5176\u6700\u540e\u4e00\u6b65\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u5199\u5728~\/.bashrc\u91cc\u9762\u5c31\u884c\u3002<\/p>\n<h2>\u4e94\u3001\u7f16\u8bd1\u5b89\u88c5Pytorch<\/h2>\n<h3>5.1\u3001\u524d\u63d0\u51c6\u5907<\/h3>\n<p>\u5728\u6b63\u5f0f\u7f16\u8bd1\u5b89\u88c5Pytorch\u524d&#xff0c;\u4f60\u8981\u786e\u8ba4\u5df2\u7ecf\u5f04\u597d\u4e86\u4ee5\u4e0b\u914d\u7f6e&#xff1a;<\/p>\n<li>CUDA\u9a71\u52a8\u548cCUDA&#xff1a;\u4f7f\u7528nvidia-smi\u548cnvcc -V\u5747\u6709\u503c&#xff0c;\u5e76\u4e14\u5df2\u7ecf\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86CUDNN&#xff1b; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172219-68028a4b847b9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> 2.\u5177\u590710\u7248\u672c\u4ee5\u4e0a\u7684gcc\u7f16\u8bd1\u73af\u5883&#xff1a;\u4f7f\u7528gcc -v\u67e5\u770b <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172219-68028a4bdfb23.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> 3.\u5b89\u88c5\u4e86Anaconda\u6216\u8005Miniconda&#xff1a;\u8f93\u5165conda env list\u53ef\u4ee5\u770b\u5230\u5df2\u6709\u7684\u865a\u62df\u73af\u5883&#xff1b; 4.\u5b89\u88c5\u597d\u4e86cmake&#xff0c;\u5373\u8f93\u5165cmake &#8211;version\u53ef\u4ee5\u770b\u5230cmake\u7684\u7248\u672c\u53f7<\/li>\n<h3>5.2\u3001\u4e0b\u8f7dpytorch\u6e90\u7801<\/h3>\n<p>\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5pytorch\u524d&#xff0c;\u9700\u8981\u4e0b\u8f7d\u5b8c\u6574\u7684pytorch\u6e90\u7801&#xff1a;https:\/\/github.com\/pytorch\/pytorch\/tree\/v1.10.2-rc1<\/p>\n<p>\u9996\u5148\u4f7f\u7528git clone &#8211;recursive https:\/\/github.com\/pytorch\/pytorch\u5f00\u59cb\u514b\u9686\u6e90\u7801&#xff0c;\u5982\u679c\u78b0\u5230\u7f51\u7edc\u95ee\u9898\u9700\u8981\u8bbe\u7f6egit\u4ee3\u7406&#xff1a;<\/p>\n<p><span class=\"token comment\"># git \u4ee3\u7406\u8bbe\u7f6e&#xff0c;\u524d\u63d0\u662f\u4f60\u6709\u4ee3\u7406<\/span><br \/>\n<span class=\"token comment\"># git config &#8211;global http.proxy &#034;localhost:\u7aef\u53e3\u53f7&#034;<\/span><br \/>\n<span class=\"token comment\"># git config &#8211;global https.proxy &#034;localhost:\u7aef\u53e3\u53f7&#034;<\/span><br \/>\n<span class=\"token comment\"># \u4ee3\u7406\u8bbe\u7f6e\u597d&#xff0c;\u4e0b\u8f7d\u5b8c\u540e&#xff0c;\u5c31\u53ef\u4ee5\u53d6\u6d88\u4e86&#xff0c;\u5426\u5219\u53ef\u80fd\u5f71\u54cd\u4f60\u5176\u4ed6\u64cd\u4f5c<\/span><br \/>\n<span class=\"token comment\"># \u53d6\u6d88\u4ee3\u7406 <\/span><br \/>\n<span class=\"token comment\"># git config &#8211;global &#8211;unset http.proxy <\/span><br \/>\n<span class=\"token comment\"># git config &#8211;global &#8211;unset https.proxy<\/span><\/p>\n<p>\u5982\u679c\u6ca1\u6709\u4ee3\u7406&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fdb\u884c\u4e0b\u8f7d&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5982\u679c\u7f51\u7edc\u4e0d\u884c\u53ef\u4ee5\u8bd5\u7740\u901a\u8fc7\u955c\u50cf\u5730\u5740 \u6216 gitee \u514b\u9686<\/span><br \/>\n<span class=\"token comment\"># \u5982 git clone &#8211;recursive https:\/\/hub.yzuu.cf\/pytorch\/pytorch<\/span><br \/>\n<span class=\"token comment\"># \u5982 git clone &#8211;recursive https:\/\/gitee.com\/ascend\/pytorch.git<\/span><\/p>\n<p>\u5728\u4e0b\u8f7d\u597dpytorch\u6e90\u7801\u540e&#xff0c;\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\u5c31\u662f\u5fc5\u987b\u9012\u5f52\u4e0b\u8f7d\u5176\u4e2d\u7684\u94fe\u63a5\u5305&#xff0c;\u8fd9\u91cc\u4f7f\u7528git submodule\u9012\u5f52\u4e0b\u8f7d&#xff1a;<\/p>\n<p><span class=\"token function\">git<\/span> submodule <span class=\"token function\">sync<\/span><br \/>\n<span class=\"token function\">git<\/span> submodule update <span class=\"token parameter variable\">&#8211;init<\/span> <span class=\"token parameter variable\">&#8211;recursive<\/span><\/p>\n<p>\u5b89\u88c5\u597d\u540e&#xff0c;\u4f60\u7684pytorch\u5305\u4e00\u822c\u57282.5GB\u4ee5\u4e0a&#xff0c;\u5982\u679c\u6587\u4ef6\u5927\u5c0f\u8fc7\u5c0f&#xff0c;\u8bf4\u660e\u4f60\u6709\u4e9b\u9012\u5f52\u7684\u5305\u6ca1\u4e0b\u8f7d\u5b8c\u6574\u3002<\/p>\n<h3>5.3\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<p>\u4f7f\u7528vim ~\/.bashrc\u6216\u8005\u4f7f\u7528mobaXtem\u7684\u6587\u4ef6\u6811\u65b9\u5f0f\u6253\u5f00\u73af\u5883\u53d8\u91cf\u6587\u4ef6&#xff0c;\u91cc\u9762\u7684\u5185\u5bb9\u914d\u7f6e\u5982\u4e0b&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172220-68028a4c201bc.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>export USE_CUDA&#061;1&#xff1a;\u7528\u4e8e\u8bbe\u7f6e\u4e00\u4e2a\u540d\u4e3a USE_CUDA \u7684\u73af\u5883\u53d8\u91cf&#xff0c;\u5e76\u5c06\u5176\u503c\u8bbe\u7f6e\u4e3a 1\u3002\u53ef\u80fd\u7528\u4e8e\u544a\u77e5\u540e\u7eed\u7684\u811a\u672c\u6216\u7a0b\u5e8f&#xff0c;\u5728\u6784\u5efa\u8fc7\u7a0b\u4e2d\u9700\u8981\u4f7f\u7528 CUDA \u8fdb\u884c\u52a0\u901f\u6216\u5176\u4ed6\u76f8\u5173\u64cd\u4f5c\u3002<\/li>\n<li>export USE_SYSTEM_NCCL&#061;ON&#xff1a;\u8bbe\u7f6e\u4e00\u4e2a\u73af\u5883\u53d8\u91cf USE_SYSTEM_NCCL \u7684\u503c\u4e3a ON&#xff0c;\u8868\u660e\u4f7f\u7528\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684 NCCL \u5e93\u3002<\/li>\n<li>CUDA \u76f8\u5173\u7684\u73af\u5883\u53d8\u91cf&#xff1a;\u8bbe\u7f6e CUDA \u5b89\u88c5\u8def\u5f84\u3001\u76f8\u5173 bin \u548c lib \u8def\u5f84&#xff0c;\u540c\u65f6\u8fd8\u6307\u5b9a\u4e86 CMake \u6240\u4f7f\u7528\u7684 CUDA \u7f16\u8bd1\u5668\u548c CUDNN \u5e93\u7684\u8def\u5f84\u3002<\/li>\n<li>CMAKE\u76f8\u5173\u7684\u73af\u5883\u53d8\u91cf&#xff1a;\u6dfb\u52a0\u4e86 CMake \u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\u5230 PATH \u73af\u5883\u53d8\u91cf\u4e2d\u3001\u8bbe\u7f6e CMake \u7684\u524d\u7f00\u8def\u5f84&#xff0c;\u7528\u4e8e\u6307\u5b9a\u989d\u5916\u7684 CMake \u6a21\u5757\u548c\u5305\u7684\u4f4d\u7f6e\u3002<\/li>\n<li>export MAX_JOBS&#061;4&#xff1a;\u8bbe\u7f6e\u4e00\u4e2a\u540d\u4e3a MAX_JOBS \u7684\u73af\u5883\u53d8\u91cf&#xff0c;\u5e76\u5c06\u5176\u503c\u8bbe\u7f6e\u4e3a 4&#xff0c;\u53ef\u80fd\u7528\u4e8e\u6307\u5b9a\u5e76\u884c\u7f16\u8bd1\u4efb\u52a1\u7684\u6700\u5927\u6570\u91cf\u3002\u8fd9\u4e2a\u6309\u673a\u5668\u8fdb\u884c\u8bbe\u7f6e&#xff0c;\u592a\u5927\u4e86\u5bb9\u6613\u5d29\u6e83\u3002<\/li>\n<li>GCC\u76f8\u5173\u7684\u73af\u5883\u53d8\u91cf&#xff1a;\u5305\u62ecgmp\u3001mpc\u3001mpfr\u3001gcc\u4ee5\u5728\u8fd0\u884c\u65f6\u6b63\u786e\u94fe\u63a5\u8fd9\u4e9b\u5e93\u3002<\/li>\n<\/ul>\n<h3>5.4\u3001Pytorch\u7f16\u8bd1\u5b89\u88c5<\/h3>\n<p>cd\u8fdb\u5165Pytorch\u76ee\u5f55&#xff0c;\u91c7\u7528\u76f4\u63a5\u5b89\u88c5\u7684\u65b9\u5f0f\u8fdb\u884c\u5b89\u88c5&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u76f4\u63a5\u5b89\u88c5<\/span><br \/>\npython setup.py <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">&#8211;cmake<\/span><br \/>\n<span class=\"token comment\"># \u6216\u8005 \u7f16\u8bd1\u6210 whl\u5b89\u88c5\u6587\u4ef6&#xff0c;\u7f16\u8bd1\u6210\u529f\u540e\u5728dist\u6587\u4ef6\u4e0b\u9762&#xff0c;\u53ef\u901a\u8fc7 pip install torch-xxxx.whl \u5b89\u88c5<\/span><br \/>\npython setup.py bdist_wheel <span class=\"token parameter variable\">&#8211;cmake<\/span><\/p>\n<p>\u5b89\u88c5\u8fc7\u7a0b\u5927\u6982\u572840\u5206\u949f\u52302\u5c0f\u65f6\u4e0d\u7b49&#xff1a; <img decoding=\"async\" src=\"2025-04-19fkltxsmxjf5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>5.5\u3001\u6d4b\u8bd5Pytorch<\/h3>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u6fc0\u6d3b\u865a\u62df\u73af\u5883&#xff0c;\u7136\u540e\u8f93\u5165python&#xff0c;\u7136\u540e\u8f93\u5165\u4e00\u4e0b\u4ee3\u7801&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> torch<br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>torch<span class=\"token punctuation\">.<\/span>__version__<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>torch<span class=\"token punctuation\">.<\/span>cuda<span class=\"token punctuation\">.<\/span>is_available<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5982\u679c\u663e\u793aTrue\u5373\u5927\u529f\u544a\u6210&#xff01;<\/p>\n<p>\u5982\u679c\u62a5\u9519&#xff1a;NameError: name \u2018sympy\u2019 is not defined\u2018&#xff0c;\u5219\u9700\u8981\u5728conda\u91cc\u518d\u5b89\u88c5sympy\u6a21\u5757&#xff0c;\u5982\u679c\u8fd8\u662f\u62a5\u9519&#xff0c;\u9700\u8981\u5b89\u88c5mpmath&#xff0c;\u53cd\u6b63\u5c31import torch\u62a5\u5565\u9519\u5c31\u8865\u4e0a\u76f8\u5173\u7684\u73af\u5883\u5c31\u597d\u3002<\/p>\n<p>\u6700\u540e\u53ef\u4ee5\u518d\u8fd0\u884c\u4ee5\u4e0b\u4ee3\u7801\u67e5\u770b\u663e\u5361\u6570\u91cf\u548c\u663e\u5361\u578b\u53f7<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>torch<span class=\"token punctuation\">.<\/span>cuda<span class=\"token punctuation\">.<\/span>device_count<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>torch<span class=\"token punctuation\">.<\/span>cuda<span class=\"token punctuation\">.<\/span>get_device_name<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5c31\u80fd\u770b\u5230torch\u6210\u529f\u8c03\u7528\u5230\u4e86A100\u5566&#xff01;<\/p>\n<h2>\u7279\u522b\u9e23\u8c22\u4ee5\u4e0b\u535a\u5ba2<\/h2>\n<p>\u5b89\u88c5CUDA&#xff1a; https:\/\/www.cnblogs.com\/li-minghao\/p\/13089405.html<\/p>\n<p>\u5b89\u88c5CUDNN&#xff1a; https:\/\/blog.csdn.net\/YY007H\/article\/details\/134772564<\/p>\n<p>\u5b89\u88c5gcc&#xff1a; https:\/\/blog.csdn.net\/qq_36393978\/article\/details\/118678521 https:\/\/blog.csdn.net\/qq_38308388\/article\/details\/127574517<\/p>\n<p>\u5b89\u88c5nccl&#xff1a;https:\/\/blog.csdn.net\/Scenery0519\/article\/details\/128081062<\/p>\n<p>\u5b89\u88c5pytorch&#xff1a; https:\/\/blog.csdn.net\/CSDN_ten\/article\/details\/132636688<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.8k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf44\u6b21\u3002\u6700\u8fd1\u62ff\u5230\u4e00\u53f0\u6607\u817eaarch64\u670d\u52a1\u5668\uff0c\u4f46\u662f\u4e0e\u5e73\u5e38\u914d\u7f6e\u73af\u5883\u4e0d\u540c\uff0c\u670d\u52a1\u5668\u5b58\u5728\u4e09\u5927\u96be\u9898\uff1a&gt;  1. \u7531\u4e8e\u5b89\u5168\u63a7\u5236\uff0c\u670d\u52a1\u5668\u672c\u8eab\u4e0d\u80fd\u8bbf\u95ee\u5916\u7f51\uff1b&gt;  2. \u670d\u52a1\u5668\u672c\u8eab\u4e3aARM\u67b6\u6784\uff08aarch64\uff09&gt;  3. \u6ca1\u6709\u7ba1\u7406\u5458\u6743\u9650\u672c\u6587\u603b\u7ed3\u4e86\u4e00\u5957\u5728\u6607\u817eaarch64\u670d\u52a1\u5668\u7f16\u8bd1\u5b89\u88c5\u652f\u6301GPU\u7684Pytorch\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u8bb0\u5f55\u5728\u6b64\u3002\u7f16\u8bd1\u5b89\u88c5Pytorch\u9700\u8981\u6781\u9ad8\u7684\u8010\u5fc3\u548c\u8f83\u5f3a\u7684\u52a8\u624b\u80fd\u529b\uff0c\u5728\u52a8\u624b\u4e4b\u524d\uff0c\u4f60\u8fd8\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u6761\u4ef6\u3002_arm\u5e73\u53f0 \u7f16\u8bd1 pytorch<\/p>\n","protected":false},"author":2,"featured_media":18984,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1456,821,1455,1458,152,67,1454,1457],"topic":[],"class_list":["post-19004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-aarch64","tag-cuda","tag-gcc","tag-hpc","tag-pytorch","tag-67","tag-1454","tag-1457"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/19004.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.8k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf44\u6b21\u3002\u6700\u8fd1\u62ff\u5230\u4e00\u53f0\u6607\u817eaarch64\u670d\u52a1\u5668\uff0c\u4f46\u662f\u4e0e\u5e73\u5e38\u914d\u7f6e\u73af\u5883\u4e0d\u540c\uff0c\u670d\u52a1\u5668\u5b58\u5728\u4e09\u5927\u96be\u9898\uff1a&gt; 1. \u7531\u4e8e\u5b89\u5168\u63a7\u5236\uff0c\u670d\u52a1\u5668\u672c\u8eab\u4e0d\u80fd\u8bbf\u95ee\u5916\u7f51\uff1b&gt; 2. \u670d\u52a1\u5668\u672c\u8eab\u4e3aARM\u67b6\u6784\uff08aarch64\uff09&gt; 3. \u6ca1\u6709\u7ba1\u7406\u5458\u6743\u9650\u672c\u6587\u603b\u7ed3\u4e86\u4e00\u5957\u5728\u6607\u817eaarch64\u670d\u52a1\u5668\u7f16\u8bd1\u5b89\u88c5\u652f\u6301GPU\u7684Pytorch\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u8bb0\u5f55\u5728\u6b64\u3002\u7f16\u8bd1\u5b89\u88c5Pytorch\u9700\u8981\u6781\u9ad8\u7684\u8010\u5fc3\u548c\u8f83\u5f3a\u7684\u52a8\u624b\u80fd\u529b\uff0c\u5728\u52a8\u624b\u4e4b\u524d\uff0c\u4f60\u8fd8\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u6761\u4ef6\u3002_arm\u5e73\u53f0 \u7f16\u8bd1 pytorch\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/19004.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T17:22:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172214-68028a46c18ca.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/19004.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/19004.html\",\"name\":\"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T17:22:21+00:00\",\"dateModified\":\"2025-04-18T17:22:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/19004.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/19004.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/19004.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/19004.html","og_locale":"zh_CN","og_type":"article","og_title":"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.8k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf44\u6b21\u3002\u6700\u8fd1\u62ff\u5230\u4e00\u53f0\u6607\u817eaarch64\u670d\u52a1\u5668\uff0c\u4f46\u662f\u4e0e\u5e73\u5e38\u914d\u7f6e\u73af\u5883\u4e0d\u540c\uff0c\u670d\u52a1\u5668\u5b58\u5728\u4e09\u5927\u96be\u9898\uff1a&gt; 1. \u7531\u4e8e\u5b89\u5168\u63a7\u5236\uff0c\u670d\u52a1\u5668\u672c\u8eab\u4e0d\u80fd\u8bbf\u95ee\u5916\u7f51\uff1b&gt; 2. \u670d\u52a1\u5668\u672c\u8eab\u4e3aARM\u67b6\u6784\uff08aarch64\uff09&gt; 3. \u6ca1\u6709\u7ba1\u7406\u5458\u6743\u9650\u672c\u6587\u603b\u7ed3\u4e86\u4e00\u5957\u5728\u6607\u817eaarch64\u670d\u52a1\u5668\u7f16\u8bd1\u5b89\u88c5\u652f\u6301GPU\u7684Pytorch\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u8bb0\u5f55\u5728\u6b64\u3002\u7f16\u8bd1\u5b89\u88c5Pytorch\u9700\u8981\u6781\u9ad8\u7684\u8010\u5fc3\u548c\u8f83\u5f3a\u7684\u52a8\u624b\u80fd\u529b\uff0c\u5728\u52a8\u624b\u4e4b\u524d\uff0c\u4f60\u8fd8\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u6761\u4ef6\u3002_arm\u5e73\u53f0 \u7f16\u8bd1 pytorch","og_url":"https:\/\/www.wsisp.com\/helps\/19004.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T17:22:21+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418172214-68028a46c18ca.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/19004.html","url":"https:\/\/www.wsisp.com\/helps\/19004.html","name":"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T17:22:21+00:00","dateModified":"2025-04-18T17:22:21+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/19004.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/19004.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/19004.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u89e3\u51b3\u65b9\u6848\uff1a\u6607\u817eaarch64\u670d\u52a1\u5668\u5b89\u88c5CUDA+GCC+CMake\uff0c\u7f16\u8bd1\u5b89\u88c5Pytorch\uff0c\u534e\u4e3a\u6607\u817eHPC\u670d\u52a1\u5668\u6df1\u5ea6\u5b66\u4e60\u73af\u5883\u5b89\u88c5\u5168\u6d41\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/19004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=19004"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/19004\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/18984"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=19004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=19004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=19004"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=19004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}