{"id":42456,"date":"2025-06-09T07:10:56","date_gmt":"2025-06-08T23:10:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/42456.html"},"modified":"2025-06-09T07:10:56","modified_gmt":"2025-06-08T23:10:56","slug":"%e5%8a%a8%e6%89%8b%e5%ad%a6%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a012-7-%e5%8f%82%e6%95%b0%e6%9c%8d%e5%8a%a1%e5%99%a8-%e7%ac%94%e8%ae%b0%e7%bb%83%e4%b9%a0%ef%bc%88pytorch%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/42456.html","title":{"rendered":"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09"},"content":{"rendered":"<p>\u4ee5\u4e0b\u5185\u5bb9\u4e3a\u7ed3\u5408\u674e\u6c90\u8001\u5e08\u7684\u8bfe\u7a0b\u548c\u6559\u6750\u8865\u5145\u7684\u5b66\u4e60\u7b14\u8bb0&#xff0c;\u4ee5\u53ca\u5bf9\u8bfe\u540e\u7ec3\u4e60\u7684\u4e00\u4e9b\u601d\u8003&#xff0c;\u81ea\u7559\u56de\u987e&#xff0c;\u4e5f\u4f9b\u540c\u5b66\u4e4b\u4eba\u4ea4\u6d41\u53c2\u8003\u3002<\/p>\n<p>\u672c\u8282\u8bfe\u7a0b\u5730\u5740&#xff1a;35 \u5206\u5e03\u5f0f\u8bad\u7ec3\u3010\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e60v2\u3011_\u54d4\u54e9\u54d4\u54e9_bilibili<\/p>\n<p>\u672c\u8282\u6559\u6750\u5730\u5740&#xff1a;12.7. \u53c2\u6570\u670d\u52a1\u5668 \u2014 \u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e60 2.0.0 documentation<\/p>\n<p>\u672c\u8282\u5f00\u6e90\u4ee3\u7801&#xff1a;&#8230;&gt;d2l-zh&gt;pytorch&gt;chapter_optimization&gt;parameterserver.ipynb<\/p>\n<hr \/>\n<h3>\u53c2\u6570\u670d\u52a1\u5668<\/h3>\n<p>\u5f53\u6211\u4eec\u4ece\u4e00\u4e2aGPU\u8fc1\u79fb\u5230\u591a\u4e2aGPU\u65f6&#xff0c;\u4ee5\u53ca\u518d\u8fc1\u79fb\u5230\u5305\u542b\u591a\u4e2aGPU\u7684\u591a\u4e2a\u670d\u52a1\u5668\u65f6&#xff08;\u53ef\u80fd\u6240\u6709\u670d\u52a1\u5668\u7684\u5206\u5e03\u8de8\u8d8a\u4e86\u591a\u4e2a\u673a\u67b6\u548c\u591a\u4e2a\u7f51\u7edc\u4ea4\u6362\u673a&#xff09;&#xff0c;\u5206\u5e03\u5f0f\u5e76\u884c\u8bad\u7ec3\u7b97\u6cd5\u4e5f\u9700\u8981\u53d8\u5f97\u66f4\u52a0\u590d\u6742\u3002\u901a\u8fc7\u7ec6\u8282\u53ef\u4ee5\u77e5\u9053&#xff0c;\u4e00\u65b9\u9762\u662f\u4e0d\u540c\u7684\u4e92\u8fde\u65b9\u5f0f\u7684\u5e26\u5bbd\u5b58\u5728\u6781\u5927\u7684\u533a\u522b&#xff08;\u4f8b\u5982&#xff0c;NVLink\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u5b9e\u73b0\u8de8$6$\u6761\u94fe\u8def\u7684\u9ad8\u8fbe100GB\/s\u7684\u5e26\u5bbd&#xff0c;16\u901a\u9053\u7684PCIe4.0\u63d0\u4f9b32GB\/s\u7684\u5e26\u5bbd&#xff0c;\u800c\u5373\u4f7f\u662f\u9ad8\u901f100GbE\u4ee5\u592a\u7f51\u4e5f\u53ea\u80fd\u63d0\u4f9b\u5927\u7ea610GB\/s\u7684\u5e26\u5bbd&#xff09;&#xff1b;\u53e6\u4e00\u65b9\u9762\u662f\u671f\u671b\u5f00\u53d1\u8005\u65e2\u80fd\u5b8c\u6210\u7edf\u8ba1\u5b66\u4e60\u5efa\u6a21\u8fd8\u7cbe\u901a\u7cfb\u7edf\u548c\u7f51\u7edc\u4e5f\u662f\u4e0d\u5207\u5b9e\u9645\u7684\u3002<\/p>\n<p>\u53c2\u6570\u670d\u52a1\u5668\u7684\u6838\u5fc3\u601d\u60f3\u9996\u5148\u662f\u7531 (Smola and Narayanamurthy, 2010) \u5728\u5206\u5e03\u5f0f\u9690\u53d8\u91cf\u6a21\u578b\u7684\u80cc\u666f\u4e0b\u5f15\u5165\u7684\u3002\u7136\u540e&#xff0c;\u5728 (ef&#061;&#034;https:\/\/zh-v2.d2l.ai\/chapter_references\/zreferences.html#id3&#034;&gt;Ahmedet al., 2012) \u4e2d\u63cf\u8ff0\u4e86Push\u548cPull\u7684\u8bed\u4e49&#xff0c;\u53c8\u5728 ( href&#061;&#034;https:\/\/zh-v2.d2l.ai\/chapter_references\/zreferences.html#id92&#034;&gt;Liet al., 2014) \u4e2d\u63cf\u8ff0\u4e86\u7cfb\u7edf\u548c\u5f00\u6e90\u5e93\u3002\u4e0b\u9762&#xff0c;\u6211\u4eec\u5c06\u4ecb\u7ecd\u7528\u4e8e\u63d0\u9ad8\u8ba1\u7b97\u6548\u7387\u7684\u7ec4\u4ef6\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"493\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e060b7.png\" width=\"720\" \/><\/p>\n<\/p>\n<h4>\u6570\u636e\u5e76\u884c\u8bad\u7ec3<\/h4>\n<p>\u8ba9\u6211\u4eec\u56de\u987e\u4e00\u4e0b\u5728\u5206\u5e03\u5f0f\u67b6\u6784\u4e2d\u6570\u636e\u5e76\u884c\u7684\u8bad\u7ec3\u65b9\u6cd5&#xff0c;\u56e0\u4e3a\u5728\u5b9e\u8df5\u4e2d\u5b83\u7684\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355&#xff0c;\u56e0\u6b64\u672c\u8282\u5c06\u6392\u9664\u5176\u4ed6\u5185\u5bb9\u53ea\u5bf9\u5176\u8fdb\u884c\u4ecb\u7ecd\u3002\u7531\u4e8e\u5f53\u4eca\u7684GPU\u62e5\u6709\u5927\u91cf\u7684\u663e\u5b58&#xff0c;\u56e0\u6b64\u5728\u5b9e\u9645\u573a\u666f\u4e2d&#xff08;\u4e0d\u5305\u62ec\u56fe\u6df1\u5ea6\u5b66\u4e60&#xff09;\u53ea\u6709\u6570\u636e\u5e76\u884c\u8fd9\u79cd\u5e76\u884c\u8bad\u7ec3\u7b56\u7565\u503c\u5f97\u63a8\u8350\u3002\u56fe 12.7.1 \u63cf\u8ff0\u4e86\u5728\u00a012.5\u8282\u00a0\u4e2d\u5b9e\u73b0\u7684\u6570\u636e\u5e76\u884c\u7684\u53d8\u4f53\u3002\u5176\u4e2d\u7684\u5173\u952e\u662f\u68af\u5ea6\u7684\u805a\u5408\u9700\u8981\u5728\u5355\u4e2aGPU&#xff08;GPU 0&#xff09;\u4e0a\u5b8c\u6210&#xff0c;\u7136\u540e\u518d\u5c06\u66f4\u65b0\u540e\u7684\u53c2\u6570\u5e7f\u64ad\u7ed9\u6240\u6709GPU\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"638\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e255a5.png\" width=\"720\" \/><\/p>\n<\/p>\n<p>\u56de\u987e\u6765\u770b&#xff0c;\u9009\u62e9GPU 0\u8fdb\u884c\u805a\u5408\u4f3c\u4e4e\u662f\u4e2a\u5f88\u968f\u4fbf\u7684\u51b3\u5b9a&#xff0c;\u5f53\u7136\u4e5f\u53ef\u4ee5\u9009\u62e9CPU\u4e0a\u805a\u5408&#xff0c;\u4e8b\u5b9e\u4e0a\u53ea\u8981\u4f18\u5316\u7b97\u6cd5\u652f\u6301&#xff0c;\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\u751a\u81f3\u53ef\u4ee5\u5728\u67d0\u4e2aGPU\u4e0a\u805a\u5408\u5176\u4e2d\u4e00\u4e9b\u53c2\u6570&#xff0c;\u800c\u5728\u53e6\u4e00\u4e2aGPU\u4e0a\u805a\u5408\u53e6\u4e00\u4e9b\u53c2\u6570\u3002\u4f8b\u5982&#xff0c;\u5982\u679c\u6709\u56db\u4e2a\u4e0e\u53c2\u6570\u5411\u91cf\u76f8\u5173\u7684\u68af\u5ea6\u00a0<img decoding=\"async\" alt=\"\\\\mathbf{g}_1, \\\\ldots, \\\\mathbf{g}_4\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e3bd1b.png\" \/>\u00a0&#xff0c;\u8fd8\u53ef\u4ee5\u4e00\u4e2aGPU\u5bf9\u4e00\u4e2a\u00a0<img decoding=\"async\" alt=\"\\\\mathbf{g}_i (i &#061; 1, \\\\ldots, 4)\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e40942.png\" \/>\u00a0\u5730\u8fdb\u884c\u68af\u5ea6\u805a\u5408\u3002<\/p>\n<p>\u8fd9\u6837\u7684\u63a8\u65ad\u4f3c\u4e4e\u662f\u8f7b\u7387\u548c\u6b66\u65ad\u7684&#xff0c;\u6bd5\u7adf\u6570\u5b66\u5e94\u8be5\u662f\u903b\u8f91\u81ea\u6d3d\u7684\u3002\u4f46\u662f&#xff0c;\u6211\u4eec\u5904\u7406\u7684\u662f\u5982\u00a012.4\u8282\u00a0\u4e2d\u6240\u8ff0\u7684\u771f\u5b9e\u7684\u7269\u7406\u786c\u4ef6&#xff0c;\u5176\u4e2d\u4e0d\u540c\u7684\u603b\u7ebf\u5177\u6709\u4e0d\u540c\u7684\u5e26\u5bbd\u3002\u8003\u8651\u4e00\u4e2a\u5982\u00a012.4\u8282\u00a0\u4e2d\u6240\u8ff0\u7684\u771f\u5b9e\u76844\u8defGPU\u670d\u52a1\u5668\u3002\u5982\u679c\u5b83\u7684\u8fde\u63a5\u662f\u7279\u522b\u5b8c\u6574\u7684&#xff0c;\u90a3\u4e48\u53ef\u80fd\u62e5\u6709\u4e00\u4e2a100GbE\u7684\u7f51\u5361\u3002\u66f4\u6709\u4ee3\u8868\u6027\u7684\u6570\u5b57\u662f1-10GbE\u8303\u56f4\u5185&#xff0c;\u5176\u6709\u6548\u5e26\u5bbd\u4e3a100MB\/s\u52301GB\/s\u3002\u56e0\u4e3aCPU\u7684PCIe\u901a\u9053\u592a\u5c11&#xff08;\u4f8b\u5982&#xff0c;\u6d88\u8d39\u7ea7\u7684Intel CPU\u670924\u4e2a\u901a\u9053&#xff09;&#xff0c;\u6240\u4ee5\u65e0\u6cd5\u76f4\u63a5\u4e0e\u6240\u6709\u7684GPU\u76f8\u8fde\u63a5&#xff0c;\u56e0\u6b64\u9700\u8981multiplexer\u3002CPU\u572816x Gen3\u94fe\u8def\u4e0a\u7684\u5e26\u5bbd\u4e3a16GB\/s&#xff0c;\u8fd9\u4e5f\u662f\u6bcf\u4e2aGPU\u8fde\u63a5\u5230\u4ea4\u6362\u673a\u7684\u901f\u5ea6&#xff0c;\u8fd9\u610f\u5473\u7740GPU\u8bbe\u5907\u4e4b\u95f4\u7684\u901a\u4fe1\u66f4\u6709\u6548\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"376\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e453fe.png\" width=\"442\" \/><\/p>\n<\/p>\n<p>\u4e3a\u4e86\u4fbf\u4e8e\u8ba8\u8bba&#xff0c;\u6211\u4eec\u5047\u8bbe\u6240\u6709\u68af\u5ea6\u5171\u9700160MB\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b&#xff0c;\u5c06\u5176\u4e2d3\u4e2aGPU\u7684\u68af\u5ea6\u53d1\u9001\u5230\u7b2c4\u4e2aGPU\u4e0a\u9700\u898130\u6beb\u79d2&#xff08;\u6bcf\u6b21\u4f20\u8f93\u9700\u898110\u6beb\u79d2&#061;160MB\/16GB\/s&#xff09;\u3002\u518d\u52a0\u4e0a30\u6beb\u79d2\u5c06\u6743\u91cd\u5411\u91cf\u4f20\u8f93\u56de\u6765&#xff0c;\u5f97\u5230\u7684\u7ed3\u679c\u662f\u603b\u5171\u9700\u898160\u6beb\u79d2\u3002\u5982\u679c\u5c06\u6240\u6709\u7684\u6570\u636e\u53d1\u9001\u5230CPU&#xff0c;\u603b\u5171\u9700\u898180\u6beb\u79d2&#xff0c;\u5176\u4e2d\u5c06\u670940\u6beb\u79d2\u7684\u60e9\u7f5a&#xff0c;\u56e0\u4e3a4\u4e2aGPU\u6bcf\u4e2a\u90fd\u9700\u8981\u5c06\u6570\u636e\u53d1\u9001\u5230CPU\u3002\u6700\u540e&#xff0c;\u5047\u8bbe\u80fd\u591f\u5c06\u68af\u5ea6\u5206\u4e3a4\u4e2a\u90e8\u5206&#xff0c;\u6bcf\u4e2a\u90e8\u5206\u4e3a40MB&#xff0c;\u73b0\u5728\u53ef\u4ee5\u5728\u4e0d\u540c\u7684GPU\u4e0a\u540c\u65f6\u805a\u5408\u6bcf\u4e2a\u90e8\u5206\u3002\u56e0\u4e3aPCIe\u4ea4\u6362\u673a\u5728\u6240\u6709\u94fe\u8def\u4e4b\u95f4\u63d0\u4f9b\u5168\u5e26\u5bbd\u64cd\u4f5c&#xff0c;\u6240\u4ee5\u4f20\u8f93\u9700\u8981\u00a02.5\u00d73&#061;7.5\u00a0\u6beb\u79d2&#xff0c;\u800c\u4e0d\u662f30\u6beb\u79d2&#xff0c;\u56e0\u6b64\u540c\u6b65\u64cd\u4f5c\u603b\u5171\u9700\u898115\u6beb\u79d2\u3002\u7b80\u800c\u8a00\u4e4b&#xff0c;\u4e00\u6837\u7684\u53c2\u6570\u540c\u6b65\u64cd\u4f5c\u57fa\u4e8e\u4e0d\u540c\u7684\u7b56\u7565\u65f6\u95f4\u53ef\u80fd\u572815\u6beb\u79d2\u523080\u6beb\u79d2\u4e4b\u95f4\u3002 \u56fe12.7.3 \u63cf\u8ff0\u4e86\u4ea4\u6362\u53c2\u6570\u7684\u4e0d\u540c\u7b56\u7565\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"277\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e551a7.png\" width=\"720\" \/><\/p>\n<\/p>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u53e6\u4e00\u4e2a\u5de5\u5177\u6765\u6539\u5584\u6027\u80fd&#xff1a;\u5728\u6df1\u5ea6\u7f51\u7edc\u4e2d&#xff0c;\u4ece\u9876\u90e8\u5230\u5e95\u90e8\u8ba1\u7b97\u6240\u6709\u68af\u5ea6\u9700\u8981\u4e00\u4e9b\u65f6\u95f4&#xff0c;\u56e0\u6b64\u5373\u4f7f\u8fd8\u5728\u5fd9\u7740\u4e3a\u67d0\u4e9b\u53c2\u6570\u8ba1\u7b97\u68af\u5ea6\u65f6&#xff0c;\u5c31\u53ef\u4ee5\u5f00\u59cb\u4e3a\u51c6\u5907\u597d\u7684\u53c2\u6570\u540c\u6b65\u68af\u5ea6\u4e86\u3002\u60f3\u4e86\u89e3\u8be6\u7ec6\u4fe1\u606f\u53ef\u4ee5\u53c2\u89c1 (Sergeev and Del Balso, 2018)&#xff0c;\u60f3\u77e5\u9053\u5982\u4f55\u64cd\u4f5c\u53ef\u53c2\u8003Horovod\u3002<\/p>\n<hr \/>\n<h4>\u540c\u6b65SGD<\/h4>\n<ul>\n<li>\u6bcf\u4e2aworker\u90fd\u662f\u540c\u6b65\u8ba1\u7b97\u4e00\u4e2a\u6279\u91cf&#xff0c;\u79f0\u4e3a\u540c\u6b65SGD<\/li>\n<li>\u5047\u8bbe\u6709n\u4e2aGPU&#xff0c;\u6bcf\u4e2aGPU\u6bcf\u6b21\u5904\u7406b\u4e2a\u6837\u672c&#xff0c;\u90a3\u4e48\u540c\u6b65SGD\u7b49\u4ef7\u4e8e\u5728\u5355GPU\u8fd0\u884c\u6279\u91cf\u5927\u5c0f\u4e3anb\u7684SGD<\/li>\n<li>\u5728\u7406\u60f3\u60c5\u51b5\u4e0b&#xff0c;n\u4e2aGPU\u53ef\u4ee5\u5f97\u5230\u76f8\u5bf9\u4e8e\u5355GPU\u7684n\u500d\u52a0\u901f<\/li>\n<\/ul>\n<h4>\u6027\u80fd<\/h4>\n<ul>\n<li>t1 &#061; \u5728\u5355GPU\u4e0a\u8ba1\u7b97b\u4e2a\u6837\u672c\u68af\u5ea6\u7684\u65f6\u95f4<\/li>\n<li>\u5047\u8bbe\u6709m\u4e2a\u53c2\u6570&#xff0c;\u4e00\u4e2aworker\u6bcf\u6b21\u53d1\u9001\u548c\u63a5\u6536m\u4e2a\u53c2\u6570\u3001\u68af\u5ea6\n<ul>\n<li>t2 &#061; \u53d1\u9001\u548c\u63a5\u6536\u6240\u7528\u65f6\u95f4<\/li>\n<\/ul>\n<\/li>\n<li>\u6bcf\u4e2a\u6279\u91cf\u7684\u8ba1\u7b97\u65f6\u95f4\u4e3amax(t1,t2)\n<ul>\n<li>\u9009\u53d6\u8db3\u591f\u5927\u7684b\u4f7f\u5f97t1&gt;t2&#xff08;\u907f\u514dGPU\u7b49\u5f85&#xff0c;\u4e0d\u4f1a\u88ab\u901a\u8baf\u65f6\u95f4\u803d\u8bef&#xff09;<\/li>\n<li>\u589e\u52a0b\u6216n\u5bfc\u81f4\u66f4\u5927\u7684\u6279\u91cf\u5927\u5c0f&#xff0c;\u5bfc\u81f4\u9700\u8981\u66f4\u591a\u7684\u8ba1\u7b97\u6765\u5f97\u5230\u7ed9\u5b9a\u7684\u6a21\u578b\u7cbe\u5ea6&#xff08;\u9700\u8981\u589e\u52a0epoch&#xff09;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"429\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e65a23.png\" width=\"637\" \/><\/p>\n<\/p>\n<h4>\u5b9e\u8df5\u65f6\u7684\u5efa\u8bae<\/h4>\n<ul>\n<li>\u4f7f\u7528\u4e00\u4e2a\u5927\u6570\u636e\u96c6<\/li>\n<li>\u9700\u8981\u597d\u7684GPU-GPU\u548c\u673a\u5668-\u673a\u5668\u5e26\u5bbd<\/li>\n<li>\u9ad8\u6548\u7684\u6570\u636e\u8bfb\u53d6\u548c\u9884\u5904\u7406<\/li>\n<li>\u6a21\u578b\u9700\u8981\u6709\u597d\u7684\u8ba1\u7b97&#xff08;FLOP&#xff09;\u901a\u8baf&#xff08;model size&#xff09;\u6bd4\n<ul>\n<li>Inception &gt; ResNet &gt; AlexNet<\/li>\n<\/ul>\n<\/li>\n<li>\u4f7f\u7528\u8db3\u591f\u5927\u7684\u6279\u91cf\u5927\u5c0f\u6765\u5f97\u5230\u597d\u7684\u7cfb\u7edf\u6027\u80fd<\/li>\n<li>\u4f7f\u7528\u9ad8\u6548\u7684\u4f18\u5316\u7b97\u6cd5\u6765\u5bf9\u5e94\u5927\u6279\u91cf\u5927\u5c0f<\/li>\n<\/ul>\n<h4>\u603b\u7ed3<\/h4>\n<ul>\n<li>\u5206\u5e03\u5f0f\u540c\u6b65\u6570\u636e\u5e76\u884c\u662f\u591aGPU\u6570\u636e\u5e76\u884c\u5728\u591a\u673a\u5668\u4e0a\u7684\u62d3\u5c55<\/li>\n<li>\u7f51\u7edc\u901a\u8baf\u901a\u5e38\u662f\u74f6\u9888<\/li>\n<li>\u9700\u8981\u6ce8\u610f\u4f7f\u7528\u7279\u522b\u5927\u7684\u6279\u91cf\u5927\u5c0f\u65f6\u7684\u6536\u655b\u6548\u7387<\/li>\n<li>\u66f4\u590d\u6742\u7684\u5206\u5e03\u5f0f\u6709\u5f02\u6b65\u3001\u6a21\u578b\u5e76\u884c<\/li>\n<\/ul>\n<hr \/>\n<h4>\u73af\u540c\u6b65&#xff08;Ring Synchronization&#xff09;<\/h4>\n<p>\u5f53\u8c08\u53ca\u73b0\u4ee3\u6df1\u5ea6\u5b66\u4e60\u786c\u4ef6\u7684\u540c\u6b65\u95ee\u9898\u65f6&#xff0c;\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u5927\u91cf\u7684\u5b9a\u5236\u7684\u7f51\u7edc\u8fde\u63a5\u3002\u4f8b\u5982&#xff0c;AWS p3.16xlarge\u548cNVIDIA DGX-2\u5b9e\u4f8b\u4e2d\u7684\u8fde\u63a5\u90fd\u4f7f\u7528\u4e86 \u56fe12.7.4 \u4e2d\u7684\u7ed3\u6784\u3002\u6bcf\u4e2aGPU\u901a\u8fc7PCIe\u94fe\u8def\u8fde\u63a5\u5230\u4e3b\u673aCPU&#xff0c;\u8be5\u94fe\u8def\u6700\u591a\u53ea\u80fd\u4ee516GB\/s\u7684\u901f\u5ea6\u8fd0\u884c\u3002\u6b64\u5916&#xff0c;\u6bcf\u4e2aGPU\u8fd8\u5177\u67096\u4e2aNVLink\u8fde\u63a5&#xff0c;\u6bcf\u4e2aNVLink\u8fde\u63a5\u90fd\u80fd\u591f\u4ee5300Gbit\/s\u8fdb\u884c\u53cc\u5411\u4f20\u8f93\u3002\u8fd9\u76f8\u5f53\u4e8e\u6bcf\u4e2a\u94fe\u8def\u6bcf\u4e2a\u65b9\u5411\u7ea6\u00a0300\u00f78\u00f72\u224818GB\/s\u00a0\u3002\u7b80\u8a00\u4e4b&#xff0c;\u805a\u5408\u7684NVLink\u5e26\u5bbd\u660e\u663e\u9ad8\u4e8ePCIe\u5e26\u5bbd&#xff0c;\u95ee\u9898\u662f\u5982\u4f55\u6709\u6548\u5730\u4f7f\u7528\u5b83\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"511\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e797b4.png\" width=\"720\" \/><\/p>\n<\/p>\n<p>(ref&#061;&#034;https:\/\/zh-v2.d2l.ai\/chapter_references\/zreferences.html#id176&#034;&gt;Wanget al., 2018) \u7684\u7814\u7a76\u7ed3\u679c\u8868\u660e\u6700\u4f18\u7684\u540c\u6b65\u7b56\u7565\u662f\u5c06\u7f51\u7edc\u5206\u89e3\u6210\u4e24\u4e2a\u73af&#xff0c;\u5e76\u57fa\u4e8e\u4e24\u4e2a\u73af\u76f4\u63a5\u540c\u6b65\u6570\u636e\u3002 \u56fe12.7.5 \u63cf\u8ff0\u4e86\u7f51\u7edc\u53ef\u4ee5\u5206\u89e3\u4e3a\u4e00\u4e2a\u5177\u6709\u53ccNVLink\u5e26\u5bbd\u7684\u73af&#xff08;1-2-3-4-5-6-7-8-1&#xff09;\u548c\u4e00\u4e2a\u5177\u6709\u5e38\u89c4\u5e26\u5bbd\u7684\u73af&#xff08;1-4-6-3-5-8-2-7-1&#xff09;\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b&#xff0c;\u8bbe\u8ba1\u4e00\u4e2a\u9ad8\u6548\u7684\u540c\u6b65\u534f\u8bae\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"636\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e8f4ba.png\" width=\"657\" \/><\/p>\n<\/p>\n<p>\u8003\u8651\u4e0b\u9762\u7684\u601d\u7ef4\u8bd5\u9a8c&#xff1a;\u7ed9\u5b9a\u7531\u00a0n\u00a0\u4e2a\u8ba1\u7b97\u8282\u70b9&#xff08;\u6216GPU&#xff09;\u7ec4\u6210\u7684\u4e00\u4e2a\u73af&#xff0c;\u68af\u5ea6\u53ef\u4ee5\u4ece\u7b2c\u4e00\u4e2a\u8282\u70b9\u53d1\u9001\u5230\u7b2c\u4e8c\u4e2a\u8282\u70b9&#xff0c;\u5728\u7b2c\u4e8c\u4e2a\u8282\u70b9\u5c06\u672c\u5730\u7684\u68af\u5ea6\u4e0e\u4f20\u9001\u7684\u68af\u5ea6\u76f8\u52a0\u5e76\u53d1\u9001\u5230\u7b2c\u4e09\u4e2a\u8282\u70b9&#xff0c;\u4f9d\u6b64\u7c7b\u63a8\u3002\u5728\u00a0n\u22121\u00a0\u6b65\u4e4b\u540e&#xff0c;\u53ef\u4ee5\u5728\u6700\u540e\u8bbf\u95ee\u7684\u8282\u70b9\u4e2d\u627e\u5230\u805a\u5408\u68af\u5ea6\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u805a\u5408\u68af\u5ea6\u7684\u65f6\u95f4\u968f\u8282\u70b9\u6570\u7ebf\u6027\u589e\u957f\u3002\u4f46\u5982\u679c\u7167\u6b64\u64cd\u4f5c&#xff0c;\u7b97\u6cd5\u662f\u76f8\u5f53\u4f4e\u6548\u7684\u3002\u5f52\u6839\u7ed3\u5e95&#xff0c;\u5728\u4efb\u4f55\u65f6\u5019\u90fd\u53ea\u6709\u4e00\u4e2a\u8282\u70b9\u5728\u901a\u4fe1\u3002\u5982\u679c\u6211\u4eec\u5c06\u68af\u5ea6\u5206\u4e3a\u00a0n\u00a0\u4e2a\u5757&#xff0c;\u5e76\u4ece\u8282\u70b9\u00a0i\u00a0\u5f00\u59cb\u540c\u6b65\u5757\u00a0i\u00a0&#xff0c;\u4f1a\u600e\u4e48\u6837&#xff1f;\u56e0\u4e3a\u6bcf\u4e2a\u5757\u7684\u5927\u5c0f\u662f\u00a01\/n\u00a0&#xff0c;\u6240\u4ee5\u603b\u65f6\u95f4\u73b0\u5728\u662f\u00a0(n\u22121)\/n\u22481\u00a0\u3002\u6362\u53e5\u8bdd\u8bf4&#xff0c;\u5f53\u6211\u4eec\u589e\u5927\u73af\u7684\u5927\u5c0f\u65f6&#xff0c;\u805a\u5408\u68af\u5ea6\u6240\u82b1\u8d39\u7684\u65f6\u95f4\u4e0d\u4f1a\u589e\u52a0\u3002\u8fd9\u662f\u4e00\u4e2a\u76f8\u5f53\u60ca\u4eba\u7684\u7ed3\u679c\u3002\u56fe12.7.6 \u8bf4\u660e\u4e86\u00a0n&#061;4\u00a0\u4e2a\u8282\u70b9\u4e0a\u7684\u6b65\u9aa4\u987a\u5e8f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"476\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187ea5637.png\" width=\"720\" \/><\/p>\n<\/p>\n<p>\u5982\u679c\u6211\u4eec\u4f7f\u7528\u76f8\u540c\u7684\u4f8b\u5b50&#xff0c;\u8de88\u4e2aV100 GPU\u540c\u6b65160MB&#xff0c;\u6211\u4eec\u5f97\u5230\u7684\u7ed3\u679c\u5927\u7ea6\u662f\u00a02\u00d7160MB\u00f7(3\u00d718GB\/s)\u22486ms\u00a0\u3002\u8fd9\u6bd4\u4f7f\u7528PCIe\u603b\u7ebf\u8981\u597d&#xff0c;\u5373\u4f7f\u6211\u4eec\u73b0\u5728\u4f7f\u7528\u7684\u662f8\u4e2aGPU\u3002\u8bf7\u6ce8\u610f&#xff0c;\u8fd9\u4e9b\u6570\u5b57\u5728\u5b9e\u8df5\u4e2d\u901a\u5e38\u4f1a\u5dee\u4e00\u4e9b&#xff0c;\u56e0\u4e3a\u6df1\u5ea6\u5b66\u4e60\u6846\u67b6\u65e0\u6cd5\u5c06\u901a\u4fe1\u7ec4\u5408\u6210\u5927\u7684\u7a81\u53d1\u4f20\u8f93\u3002<\/p>\n<p>\u6ce8\u610f\u5230\u6709\u4e00\u79cd\u5e38\u89c1\u7684\u8bef\u89e3\u8ba4\u4e3a\u73af\u540c\u6b65\u4e0e\u5176\u4ed6\u540c\u6b65\u7b97\u6cd5\u5728\u672c\u8d28\u4e0a\u662f\u4e0d\u540c\u7684&#xff0c;\u5b9e\u9645\u4e0a\u4e0e\u7b80\u5355\u7684\u6811\u7b97\u6cd5\u76f8\u6bd4\u5176\u552f\u4e00\u7684\u533a\u522b\u662f\u540c\u6b65\u8def\u5f84\u7a0d\u5fae\u7cbe\u7ec6\u4e00\u4e9b\u3002<\/p>\n<hr \/>\n<h4>\u8865\u5145&#xff1a;<\/h4>\n<h4>\u73af\u540c\u6b65\u7684\u6838\u5fc3\u601d\u60f3<\/h4>\n<p>\u200b\u200b1. \u73af\u5f62\u62d3\u6251\u200b\u200b&#xff1a; \u5c06\u53c2\u4e0e\u8bad\u7ec3\u7684GPU\u8bbe\u5907\u903b\u8f91\u4e0a\u8fde\u63a5\u6210\u4e00\u4e2a\u200b\u200b\u73af\u200b\u200b&#xff08;\u5982\u56fe12.7.6\u4e2d\u76844\u4e2a\u8282\u70b9&#xff09;\u3002\u6bcf\u4e2a\u8282\u70b9\u53ea\u4e0e\u5de6\u53f3\u4e24\u4e2a\u90bb\u5c45\u76f4\u63a5\u901a\u4fe1\u3002<\/p>\n<p>\u200b2. \u200b\u5206\u5757\u4f20\u8f93\u200b\u200b&#xff1a; \u68af\u5ea6\u88ab\u5206\u6210n\u4e2a\u5757&#xff08;n\u4e3a\u73af\u4e2d\u8282\u70b9\u6570&#xff09;\u3002\u6bcf\u4e2a\u8282\u70b9\u8d1f\u8d23\u805a\u5408\u4e00\u4e2a\u7279\u5b9a\u7684\u5757&#xff1a;<\/p>\n<ul>\n<li>\u8282\u70b9i\u4ece\u5de6\u4fa7\u90bb\u5c45\u63a5\u6536\u5757i\u7684\u90e8\u5206\u68af\u5ea6&#xff0c;\u4e0e\u672c\u5730\u68af\u5ea6\u76f8\u52a0\u540e&#xff0c;\u4f20\u9012\u7ed9\u53f3\u4fa7\u90bb\u5c45\u3002<\/li>\n<li>\u7ecf\u8fc7n\u22121\u6b65\u540e&#xff0c;\u6bcf\u4e2a\u5757\u4f1a\u5728\u5bf9\u5e94\u7684\u8282\u70b9\u5b8c\u6210\u5168\u5c40\u805a\u5408\u3002<\/li>\n<\/ul>\n<p>\u200b3. \u200b\u5e76\u884c\u901a\u4fe1\u200b\u200b&#xff1a; \u7531\u4e8e\u6bcf\u4e2a\u8282\u70b9\u540c\u65f6\u53d1\u9001\u548c\u63a5\u6536\u4e0d\u540c\u7684\u5757&#xff0c;\u200b\u200b\u73af\u540c\u6b65\u7684\u901a\u4fe1\u65f6\u95f4\u4e0d\u968f\u8282\u70b9\u6570\u7ebf\u6027\u589e\u957f\u200b\u200b\u3002\u7406\u8bba\u4e0a&#xff0c;\u805a\u5408\u65f6\u95f4\u53ef\u4ee5\u63a5\u8fd1\u5355\u4e2a\u5757\u4f20\u8f93\u7684\u65f6\u95f4&#xff08;\u4e0ePCIe\u6216NVLink\u5e26\u5bbd\u76f8\u5173&#xff09;\u3002<\/p>\n<h4>\u73af\u540c\u6b65\u7684\u4f18\u52bf<\/h4>\n<p>1. \u9ad8\u5e26\u5bbd\u5229\u7528\u7387\u200b\u200b&#xff1a; \u5229\u7528NVLink\u7b49\u9ad8\u901f\u4e92\u8fde&#xff08;\u5982DGX-2\u4e2d\u7684\u591aGPU\u8fde\u63a5&#xff09;&#xff0c;\u907f\u514dPCIe\u6216\u4ee5\u592a\u7f51\u7684\u5e26\u5bbd\u9650\u5236\u3002<\/p>\n<p>\u200b2. \u200b\u53ef\u6269\u5c55\u6027\u200b\u200b&#xff1a; \u805a\u5408\u65f6\u95f4\u4e0e\u68af\u5ea6\u5757\u5927\u5c0f\u76f8\u5173&#xff0c;\u800c\u975e\u8282\u70b9\u6570&#xff0c;\u9002\u5408\u5927\u89c4\u6a21\u96c6\u7fa4\u3002<\/p>\n<p>\u200b3. \u200b\u907f\u514d\u4e2d\u592e\u74f6\u9888\u200b\u200b&#xff1a; \u53bb\u4e2d\u5fc3\u5316\u7684\u8bbe\u8ba1\u907f\u514d\u4e86\u53c2\u6570\u670d\u52a1\u5668\u7684\u5355\u70b9\u5e26\u5bbd\u7ade\u4e89\u3002<\/p>\n<hr \/>\n<h4>\u591a\u673a\u8bad\u7ec3<\/h4>\n<p>\u65b0\u7684\u6311\u6218\u51fa\u73b0\u5728\u591a\u53f0\u673a\u5668\u4e0a\u8fdb\u884c\u5206\u5e03\u5f0f\u8bad\u7ec3&#xff1a;\u6211\u4eec\u9700\u8981\u670d\u52a1\u5668\u4e4b\u95f4\u76f8\u4e92\u901a\u4fe1&#xff0c;\u800c\u8fd9\u4e9b\u670d\u52a1\u5668\u53c8\u53ea\u901a\u8fc7\u76f8\u5bf9\u8f83\u4f4e\u7684\u5e26\u5bbd\u7ed3\u6784\u8fde\u63a5&#xff0c;\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u8fd9\u79cd\u8fde\u63a5\u7684\u901f\u5ea6\u53ef\u80fd\u4f1a\u6162\u4e00\u4e2a\u6570\u91cf\u7ea7&#xff0c;\u56e0\u6b64\u8de8\u8bbe\u5907\u540c\u6b65\u662f\u4e2a\u68d8\u624b\u7684\u95ee\u9898\u3002\u6bd5\u7adf&#xff0c;\u5728\u4e0d\u540c\u673a\u5668\u4e0a\u8fd0\u884c\u8bad\u7ec3\u4ee3\u7801\u7684\u901f\u5ea6\u4f1a\u6709\u7ec6\u5fae\u7684\u5dee\u522b&#xff0c;\u56e0\u6b64\u5982\u679c\u60f3\u4f7f\u7528\u5206\u5e03\u5f0f\u4f18\u5316\u7684\u540c\u6b65\u7b97\u6cd5\u5c31\u9700\u8981\u540c\u6b65&#xff08;synchronize&#xff09;\u8fd9\u4e9b\u673a\u5668\u3002 \u56fe12.7.7 \u8bf4\u660e\u4e86\u5206\u5e03\u5f0f\u5e76\u884c\u8bad\u7ec3\u662f\u5982\u4f55\u53d1\u751f\u7684\u3002<\/p>\n<li>\u5728\u6bcf\u53f0\u673a\u5668\u4e0a\u8bfb\u53d6\u4e00\u7ec4&#xff08;\u4e0d\u540c\u7684&#xff09;\u6279\u91cf\u6570\u636e&#xff0c;\u5728\u591a\u4e2aGPU\u4e4b\u95f4\u5206\u5272\u6570\u636e\u5e76\u4f20\u8f93\u5230GPU\u7684\u663e\u5b58\u4e2d\u3002\u57fa\u4e8e\u6bcf\u4e2aGPU\u4e0a\u7684\u6279\u91cf\u6570\u636e\u5206\u522b\u8ba1\u7b97\u9884\u6d4b\u548c\u68af\u5ea6\u3002<\/li>\n<li>\u6765\u81ea\u4e00\u53f0\u673a\u5668\u4e0a\u7684\u6240\u6709\u7684\u672c\u5730GPU\u7684\u68af\u5ea6\u805a\u5408\u5728\u4e00\u4e2aGPU\u4e0a&#xff08;\u6216\u8005\u5728\u4e0d\u540c\u7684GPU\u4e0a\u805a\u5408\u68af\u5ea6\u7684\u67d0\u4e9b\u90e8\u5206&#xff09;\u3002<\/li>\n<li>\u6bcf\u53f0\u673a\u5668\u7684\u68af\u5ea6\u88ab\u53d1\u9001\u5230\u5176\u672c\u5730CPU\u4e2d\u3002<\/li>\n<li>\u6240\u6709\u7684CPU\u5c06\u68af\u5ea6\u53d1\u9001\u5230\u4e2d\u592e\u53c2\u6570\u670d\u52a1\u5668\u4e2d&#xff0c;\u7531\u8be5\u670d\u52a1\u5668\u805a\u5408\u6240\u6709\u68af\u5ea6\u3002<\/li>\n<li>\u7136\u540e\u4f7f\u7528\u805a\u5408\u540e\u7684\u68af\u5ea6\u6765\u66f4\u65b0\u53c2\u6570&#xff0c;\u5e76\u5c06\u66f4\u65b0\u540e\u7684\u53c2\u6570\u5e7f\u64ad\u56de\u5404\u4e2aCPU\u4e2d\u3002<\/li>\n<li>\u66f4\u65b0\u540e\u7684\u53c2\u6570\u4fe1\u606f\u53d1\u9001\u5230\u672c\u5730\u4e00\u4e2a&#xff08;\u6216\u591a\u4e2a&#xff09;GPU\u4e2d\u3002<\/li>\n<li>\u6240\u6709GPU\u4e0a\u7684\u53c2\u6570\u66f4\u65b0\u5b8c\u6210\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"444\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187ebb4da.png\" width=\"720\" \/><\/p>\n<\/p>\n<p>\u4ee5\u4e0a\u8fd9\u4e9b\u64cd\u4f5c\u4f3c\u4e4e\u90fd\u76f8\u5f53\u7b80\u5355&#xff0c;\u800c\u4e14\u4e8b\u5b9e\u4e0a\u5b83\u4eec\u53ef\u4ee5\u5728\u4e00\u53f0\u673a\u5668\u5185\u9ad8\u6548\u5730\u6267\u884c&#xff0c;\u4f46\u662f\u5f53\u6211\u4eec\u8003\u8651\u591a\u53f0\u673a\u5668\u65f6&#xff0c;\u5c31\u4f1a\u53d1\u73b0\u4e2d\u592e\u7684\u53c2\u6570\u670d\u52a1\u5668\u6210\u4e3a\u4e86\u74f6\u9888\u3002\u6bd5\u7adf&#xff0c;\u6bcf\u4e2a\u670d\u52a1\u5668\u7684\u5e26\u5bbd\u662f\u6709\u9650\u7684&#xff0c;\u56e0\u6b64\u5bf9\u00a0m\u00a0\u4e2a\u5de5\u4f5c\u8282\u70b9\u6765\u8bf4&#xff0c;\u5c06\u6240\u6709\u68af\u5ea6\u53d1\u9001\u5230\u670d\u52a1\u5668\u6240\u9700\u7684\u65f6\u95f4\u662f\u00a0<img decoding=\"async\" alt=\"\\\\mathcal{O}(m)\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187ed384d.png\" \/>\u3002\u6211\u4eec\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5c06\u53c2\u6570\u670d\u52a1\u5668\u6570\u91cf\u589e\u52a0\u5230\u00a0n\u00a0\u6765\u7a81\u7834\u8fd9\u4e00\u969c\u788d\u3002\u6b64\u65f6&#xff0c;\u6bcf\u4e2a\u670d\u52a1\u5668\u53ea\u9700\u8981\u5b58\u50a8\u00a0<img decoding=\"async\" alt=\"\\\\mathcal{O}(1\/n)\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187ed86be.png\" \/>\u00a0\u4e2a\u53c2\u6570&#xff0c;\u56e0\u6b64\u66f4\u65b0\u548c\u4f18\u5316\u7684\u603b\u65f6\u95f4\u53d8\u4e3a\u00a0<img decoding=\"async\" alt=\"\\\\mathcal{O}(m\/n)\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187edf1f0.png\" \/>\u00a0\u3002\u8fd9\u4e24\u4e2a\u6570\u5b57\u7684\u5339\u914d\u4f1a\u4ea7\u751f\u7a33\u5b9a\u7684\u4f38\u7f29\u6027&#xff0c;\u800c\u4e0d\u7528\u5728\u4e4e\u6211\u4eec\u9700\u8981\u5904\u7406\u591a\u5c11\u5de5\u4f5c\u8282\u70b9\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d&#xff0c;\u6211\u4eec\u4f7f\u7528\u540c\u4e00\u53f0\u673a\u5668\u65e2\u4f5c\u4e3a\u5de5\u4f5c\u8282\u70b9\u8fd8\u4f5c\u4e3a\u670d\u52a1\u5668\u3002\u8bbe\u8ba1\u8bf4\u660e\u8bf7\u53c2\u8003 \u56fe12.7.8&#xff08;\u6280\u672f\u7ec6\u8282\u8bf7\u53c2\u8003 ( href&#061;&#034;https:\/\/zh-v2.d2l.ai\/chapter_references\/zreferences.html#id92&#034;&gt;Liet al., 2014)&#xff09;\u3002\u7279\u522b\u662f&#xff0c;\u786e\u4fdd\u591a\u53f0\u673a\u5668\u53ea\u5728\u6ca1\u6709\u4e0d\u5408\u7406\u5ef6\u8fdf\u7684\u60c5\u51b5\u4e0b\u5de5\u4f5c\u662f\u76f8\u5f53\u56f0\u96be\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"617\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187ee3e93.png\" width=\"720\" \/><\/p>\n<\/p>\n<h4>\u952e\u503c\u5b58\u50a8<\/h4>\n<p>\u5728\u5b9e\u8df5\u4e2d&#xff0c;\u5b9e\u73b0\u5206\u5e03\u5f0f\u591aGPU\u8bad\u7ec3\u6240\u9700\u8981\u7684\u6b65\u9aa4\u7edd\u975e\u6613\u4e8b\u3002\u8fd9\u5c31\u662f\u516c\u5171\u62bd\u8c61\u503c\u5f97\u4f7f\u7528\u7684\u539f\u56e0&#xff0c;\u516c\u5171\u62bd\u8c61\u5373\u91cd\u65b0\u5b9a\u4e49\u5177\u6709\u66f4\u65b0\u8bed\u4e49\u7684\u952e&#xff0d;\u503c\u5b58\u50a8&#xff08;key-value store&#xff09;\u7684\u62bd\u8c61\u3002<\/p>\n<p>\u5728\u8bb8\u591a\u5de5\u4f5c\u8282\u70b9\u548c\u8bb8\u591aGPU\u4e2d&#xff0c;\u68af\u5ea6\u00a0<img decoding=\"async\" alt=\"i\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f081a3.png\" \/>\u00a0\u7684\u8ba1\u7b97\u53ef\u4ee5\u5b9a\u4e49\u4e3a<\/p>\n<p><img decoding=\"async\" alt=\"\\\\mathbf{g}_{i} &#061; \\\\sum_{k \\\\in \\\\text{workers}} \\\\sum_{j \\\\in \\\\text{GPUs}} \\\\mathbf{g}_{ijk},\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f0cd9b.png\" \/><\/p>\n<p>\u5176\u4e2d\u00a0<img decoding=\"async\" alt=\"\\\\mathbf{g}_{ijk}\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f1440f.png\" \/>\u00a0\u662f\u5728\u5de5\u4f5c\u8282\u70b9\u00a0<img decoding=\"async\" alt=\"k\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f194cc.png\" \/>\u00a0\u7684GPU\u00a0<img decoding=\"async\" alt=\"j\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f1e199.png\" \/>\u00a0\u4e0a\u62c6\u5206\u7684\u68af\u5ea6\u00a0<img decoding=\"async\" alt=\"i\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f081a3.png\" \/>\u00a0\u7684\u4e00\u90e8\u5206\u3002\u8fd9\u4e2a\u8fd0\u7b97\u7684\u5173\u952e\u5728\u4e8e\u5b83\u662f\u4e00\u4e2a\u4ea4\u6362\u5f52\u7ea6&#xff08;commutative reduction&#xff09;&#xff0c;\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5b83\u628a\u8bb8\u591a\u5411\u91cf\u53d8\u6362\u6210\u4e00\u4e2a\u5411\u91cf&#xff0c;\u800c\u8fd0\u7b97\u987a\u5e8f\u5728\u5b8c\u6210\u5411\u91cf\u53d8\u6362\u65f6\u5e76\u4e0d\u91cd\u8981\u3002\u8fd9\u5bf9\u5b9e\u73b0\u6211\u4eec\u7684\u76ee\u6807\u6765\u8bf4\u662f\u975e\u5e38\u597d\u7684&#xff0c;\u56e0\u4e3a\u4e0d\u9700\u8981\u4e3a\u4f55\u65f6\u63a5\u6536\u54ea\u4e2a\u68af\u5ea6\u8fdb\u884c\u7ec6\u7c92\u5ea6\u7684\u63a7\u5236\u3002\u6b64\u5916&#xff0c;\u8bf7\u6ce8\u610f&#xff0c;\u8fd9\u4e2a\u64cd\u4f5c\u5728\u4e0d\u540c\u7684\u00a0<img decoding=\"async\" alt=\"i\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f081a3.png\" \/>\u00a0\u4e4b\u95f4\u662f\u72ec\u7acb\u7684\u3002<\/p>\n<p>\u8fd9\u5c31\u5141\u8bb8\u6211\u4eec\u5b9a\u4e49\u4e0b\u9762\u4e24\u4e2a\u64cd\u4f5c&#xff1a;push&#xff08;\u7528\u4e8e\u7d2f\u79ef\u68af\u5ea6&#xff09;\u548cpull&#xff08;\u7528\u4e8e\u53d6\u5f97\u805a\u5408\u68af\u5ea6&#xff09;\u3002\u56e0\u4e3a\u6211\u4eec\u6709\u5f88\u591a\u5c42&#xff0c;\u4e5f\u5c31\u6709\u5f88\u591a\u4e0d\u540c\u7684\u68af\u5ea6\u96c6\u5408&#xff0c;\u56e0\u6b64\u9700\u8981\u7528\u4e00\u4e2a\u952e\u00a0<img decoding=\"async\" alt=\"i\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231055-6846187f081a3.png\" \/>\u00a0\u6765\u5bf9\u68af\u5ea6\u5efa\u7d22\u5f15\u3002\u8fd9\u4e2a\u4e0eDynamo (&#034;https:\/\/zh-v2.d2l.ai\/chapter_references\/zreferences.html#id31&#034;&gt;DeCandiaet al., 2007)\u4e2d\u5f15\u5165\u7684\u952e&#xff0d;\u503c\u5b58\u50a8\u4e4b\u95f4\u5b58\u5728\u76f8\u4f3c\u6027\u5e76\u975e\u5de7\u5408\u3002\u5b83\u4eec\u4e24\u4e2a\u5b9a\u4e49\u90fd\u62e5\u6709\u8bb8\u591a\u76f8\u4f3c\u7684\u6027\u8d28&#xff0c;\u7279\u522b\u662f\u5728\u591a\u4e2a\u670d\u52a1\u5668\u4e4b\u95f4\u5206\u53d1\u53c2\u6570\u65f6\u3002<\/p>\n<p>\u952e&#xff0d;\u503c\u5b58\u50a8\u7684push\u4e0epull\u64cd\u4f5c\u63cf\u8ff0\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>push&#xff08;key&#xff0c;value&#xff09;\u5c06\u7279\u5b9a\u7684\u68af\u5ea6\u503c\u4ece\u5de5\u4f5c\u8282\u70b9\u53d1\u9001\u5230\u516c\u5171\u5b58\u50a8&#xff0c;\u5728\u90a3\u91cc\u901a\u8fc7\u67d0\u79cd\u65b9\u5f0f&#xff08;\u4f8b\u5982&#xff0c;\u76f8\u52a0&#xff09;\u6765\u805a\u5408\u503c&#xff1b;<\/li>\n<li>pull&#xff08;key&#xff0c;value&#xff09;\u4ece\u516c\u5171\u5b58\u50a8\u4e2d\u53d6\u5f97\u67d0\u79cd\u65b9\u5f0f&#xff08;\u4f8b\u5982&#xff0c;\u7ec4\u5408\u6765\u81ea\u6240\u6709\u5de5\u4f5c\u8282\u70b9\u7684\u68af\u5ea6&#xff09;\u7684\u805a\u5408\u503c\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u5c06\u540c\u6b65\u7684\u6240\u6709\u590d\u6742\u6027\u9690\u85cf\u5728\u4e00\u4e2a\u7b80\u5355\u7684push\u548cpull\u64cd\u4f5c\u80cc\u540e&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5c06\u7edf\u8ba1\u5efa\u6a21\u4eba\u5458&#xff08;\u4ed6\u4eec\u5e0c\u671b\u80fd\u591f\u7528\u7b80\u5355\u7684\u672f\u8bed\u8868\u8fbe\u4f18\u5316&#xff09;\u548c\u7cfb\u7edf\u5de5\u7a0b\u5e08&#xff08;\u4ed6\u4eec\u9700\u8981\u5904\u7406\u5206\u5e03\u5f0f\u540c\u6b65\u4e2d\u56fa\u6709\u7684\u590d\u6742\u6027&#xff09;\u7684\u5173\u6ce8\u70b9\u89e3\u8026\u3002<\/p>\n<h4>\u5c0f\u7ed3<\/h4>\n<ul>\n<li>\u540c\u6b65\u9700\u8981\u9ad8\u5ea6\u9002\u5e94\u7279\u5b9a\u7684\u7f51\u7edc\u57fa\u7840\u8bbe\u65bd\u548c\u670d\u52a1\u5668\u5185\u7684\u8fde\u63a5&#xff0c;\u8fd9\u79cd\u9002\u5e94\u4f1a\u4e25\u91cd\u5f71\u54cd\u540c\u6b65\u6240\u9700\u7684\u65f6\u95f4\u3002<\/li>\n<li>\u73af\u540c\u6b65\u5bf9\u4e8ep3\u548cDGX-2\u670d\u52a1\u5668\u662f\u6700\u4f73\u7684&#xff0c;\u800c\u5bf9\u4e8e\u5176\u4ed6\u670d\u52a1\u5668\u5219\u672a\u5fc5\u3002<\/li>\n<li>\u5f53\u6dfb\u52a0\u591a\u4e2a\u53c2\u6570\u670d\u52a1\u5668\u4ee5\u589e\u52a0\u5e26\u5bbd\u65f6&#xff0c;\u5206\u5c42\u540c\u6b65\u7b56\u7565\u53ef\u4ee5\u5de5\u4f5c\u7684\u5f88\u597d\u3002<\/li>\n<\/ul>\n<h4>\u7ec3\u4e60<\/h4>\n<li>\u8bf7\u5c1d\u8bd5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u73af\u540c\u6b65\u7684\u6027\u80fd\u5417\u3002&#xff08;\u63d0\u793a&#xff1a;\u53ef\u4ee5\u53cc\u5411\u53d1\u9001\u6d88\u606f\u3002&#xff09;<\/li>\n<p>\u89e3&#xff1a; \u4f20\u7edf\u73af\u540c\u6b65\u662f\u5355\u5411\u4f20\u9012\u6570\u636e&#xff0c;\u800c\u53cc\u5411\u73af\u540c\u6b65\u5141\u8bb8\u8282\u70b9\u540c\u65f6\u5411\u5de6\u53f3\u90bb\u5c45\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e&#xff0c;\u4ece\u800c\u200b\u200b\u51cf\u5c11\u901a\u4fe1\u6b65\u6570\u200b\u200b\u5e76\u200b\u200b\u63d0\u9ad8\u5e26\u5bbd\u5229\u7528\u7387\u200b\u200b\u3002\u5176\u6027\u80fd\u4f18\u52bf\u200b\u200b\u5728\u4e8e&#xff1a;<\/p>\n<ul>\n<li>\u200b\u200b\u901a\u4fe1\u6b65\u6570\u51cf\u534a\u200b\u200b&#xff1a;\u4f20\u7edf\u5355\u5411\u73af\u9700\u8981n\u22121\u6b65&#xff08;n\u4e3a\u8282\u70b9\u6570&#xff09;&#xff0c;\u800c\u53cc\u5411\u73af\u4ec5\u9700n\/2\u6b65\u3002\u4f8b\u5982&#xff0c;4\u8282\u70b9\u73af\u4ece3\u6b65\u51cf\u5c11\u52302\u6b65&#xff0c;8\u8282\u70b9\u73af\u4ece7\u6b65\u51cf\u5c11\u52304\u6b65\u3002<\/li>\n<li>\u200b\u200b\u5e26\u5bbd\u5229\u7528\u7387\u7ffb\u500d\u200b\u200b&#xff1a;\u53cc\u5411\u901a\u4fe1\u5145\u5206\u5229\u7528\u7f51\u7edc\u7684\u5168\u53cc\u5de5\u7279\u6027&#xff08;\u5982NVLink\u6216InfiniBand\u652f\u6301\u53cc\u5411\u9ad8\u5e26\u5bbd&#xff09;\u3002<\/li>\n<\/ul>\n<p>2. \u5728\u8ba1\u7b97\u4ecd\u5728\u8fdb\u884c\u4e2d&#xff0c;\u53ef\u5426\u5141\u8bb8\u6267\u884c\u5f02\u6b65\u901a\u4fe1&#xff1f;\u5b83\u5c06\u5982\u4f55\u5f71\u54cd\u6027\u80fd&#xff1f; \u89e3&#xff1a; \u5f02\u6b65\u901a\u4fe1\u7684\u539f\u7406\u200b\u200b\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u200b\u200b\u91cd\u53e0\u8ba1\u7b97\u4e0e\u901a\u4fe1\u200b\u200b&#xff1a;\u5728\u8ba1\u7b97\u68af\u5ea6&#xff08;\u524d\u5411\/\u53cd\u5411\u4f20\u64ad&#xff09;\u7684\u540c\u65f6&#xff0c;\u5f02\u6b65\u5730\u53d1\u9001\/\u63a5\u6536\u5176\u4ed6\u5c42\u7684\u68af\u5ea6\u6216\u53c2\u6570&#xff0c;\u5229\u7528\u8ba1\u7b97\u548c\u901a\u4fe1\u7684\u65f6\u95f4\u5dee\u9690\u85cf\u901a\u4fe1\u5ef6\u8fdf\u3002<\/li>\n<li>\u200b\u200b\u65e0\u9700\u5168\u5c40\u540c\u6b65\u200b\u200b&#xff1a;\u8282\u70b9\u65e0\u9700\u7b49\u5f85\u6240\u6709\u8bbe\u5907\u5b8c\u6210\u8ba1\u7b97\u5373\u53ef\u66f4\u65b0\u672c\u5730\u53c2\u6570&#xff0c;\u7c7b\u4f3c\u53c2\u6570\u670d\u52a1\u5668&#xff08;Parameter Server&#xff09;\u7684\u5f02\u6b65\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n<p>\u56e0\u6b64&#xff0c;\u8ba1\u7b97\u8fdb\u884c\u4e2d\u53ef\u4ee5\u5141\u8bb8\u6267\u884c\u5f02\u6b65\u901a\u4fe1&#xff0c;\u8fd9\u6837\u505a\u53ef\u4ee5\u8ba9\u8ba1\u7b97&#xff08;GPU&#xff09;\u548c\u901a\u4fe1&#xff08;\u7f51\u7edc\/PCIe&#xff09;\u8d44\u6e90\u5e76\u884c\u4f7f\u7528&#xff0c;\u5728\u901a\u4fe1\u5e26\u5bbd\u53d7\u9650\u65f6&#xff08;\u5982\u8de8\u673a\u8bad\u7ec3&#xff09;&#xff0c;\u663e\u8457\u63d0\u5347\u6027\u80fd\u3002\u4f46\u662f\u5f02\u6b65\u901a\u4fe1\u53ef\u80fd\u5bfc\u81f4\u8282\u70b9\u4f7f\u7528\u8fc7\u65f6\u7684\u53c2\u6570\u8ba1\u7b97\u68af\u5ea6&#xff08;\u5982\u5176\u4ed6\u8282\u70b9\u5df2\u66f4\u65b0\u591a\u8f6e&#xff09;&#xff0c;\u5f71\u54cd\u6a21\u578b\u6536\u655b\u3002<\/p>\n<p>3. \u600e\u6837\u5904\u7406\u5728\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\u4e22\u5931\u4e86\u4e00\u53f0\u670d\u52a1\u5668\u8fd9\u79cd\u95ee\u9898&#xff1f;\u5c1d\u8bd5\u8bbe\u8ba1\u4e00\u79cd\u5bb9\u9519\u673a\u5236\u6765\u907f\u514d\u91cd\u542f\u8ba1\u7b97\u8fd9\u79cd\u89e3\u51b3\u65b9\u6848&#xff1f;<\/p>\n<p>\u89e3&#xff1a; \u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u68c0\u67e5\u70b9\u6765\u8bbe\u8ba1\u5bb9\u9519\u673a\u5236&#xff1a; \u901a\u8fc7\u5b9a\u671f\u4fdd\u5b58\u8ba1\u7b97\u72b6\u6001&#xff08;\u5982\u6a21\u578b\u53c2\u6570\u3001\u4f18\u5316\u5668\u72b6\u6001\u3001\u8bad\u7ec3\u8fdb\u5ea6\u7b49&#xff09;\u5230\u78c1\u76d8\u6216\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf\u4e2d&#xff0c;\u4ee5\u4fbf\u5728\u53d1\u751f\u6545\u969c\u65f6\u53ef\u4ee5\u4ece\u6700\u8fd1\u7684\u68c0\u67e5\u70b9\u6062\u590d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u674e\u6c90\u8001\u5e08\u300a\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e60\uff08PyTorch\u7248\uff09\u300b12.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\u8be6\u89e3<\/p>\n","protected":false},"author":2,"featured_media":42436,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3949,152,3951,3950,3952,86,305],"topic":[],"class_list":["post-42456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-3949","tag-pytorch","tag-3951","tag-3950","tag-3952","tag-86","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \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\/42456.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u674e\u6c90\u8001\u5e08\u300a\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e60\uff08PyTorch\u7248\uff09\u300b12.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\u8be6\u89e3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/42456.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-08T23:10:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e060b7.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\/42456.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/42456.html\",\"name\":\"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-08T23:10:56+00:00\",\"dateModified\":\"2025-06-08T23:10:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/42456.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/42456.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/42456.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09\"}]},{\"@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":"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \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\/42456.html","og_locale":"zh_CN","og_type":"article","og_title":"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u674e\u6c90\u8001\u5e08\u300a\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e60\uff08PyTorch\u7248\uff09\u300b12.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\u8be6\u89e3","og_url":"https:\/\/www.wsisp.com\/helps\/42456.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-08T23:10:56+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250608231054-6846187e060b7.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\/42456.html","url":"https:\/\/www.wsisp.com\/helps\/42456.html","name":"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-08T23:10:56+00:00","dateModified":"2025-06-08T23:10:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/42456.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/42456.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/42456.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u52a8\u624b\u5b66\u6df1\u5ea6\u5b66\u4e6012.7. \u53c2\u6570\u670d\u52a1\u5668-\u7b14\u8bb0&amp;\u7ec3\u4e60\uff08PyTorch\uff09"}]},{"@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\/42456","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=42456"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/42456\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/42436"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=42456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=42456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=42456"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=42456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}