{"id":116,"date":"2022-12-19T16:36:26","date_gmt":"2022-12-19T08:36:26","guid":{"rendered":"https:\/\/www.laning.cc\/?p=116"},"modified":"2024-04-14T19:37:43","modified_gmt":"2024-04-14T11:37:43","slug":"gpu%e5%9c%a8%e5%b9%b6%e8%a1%8c%e4%bf%a1%e6%81%af%e5%a4%84%e7%90%86%e4%b8%ad%e7%9a%84%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/","title":{"rendered":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528"},"content":{"rendered":"\n<p>\u6458\u8981<\/p>\n\n\n\n<p>\u968f\u7740\u524d\u7aef\u6570\u636e\u91c7\u96c6\u8bbe\u5907\u7cbe\u5ea6\u7684\u4e0d\u65ad\u63d0\u9ad8\uff0c\u5bf9\u4fe1\u606f\u5904\u7406\u7cfb\u7edf\u7684\u5b9e\u65f6\u6027\u3001\u51c6\u786e\u6027\u63d0\u51fa\u66f4\u9ad8\u7684\u8981\u6c42\u3002\u800c\u4ece\u65e5\u8d8b\u5b8c\u5584\u7684\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u4e2d\uff0c\u534a\u5bfc\u4f53\u5de5\u827a\u96be\u4ee5\u53d6\u5f97\u91cd\u5927\u7a81\u7834\u7684\u60c5\u51b5\u4e0b\uff0c\u60f3\u8981\u83b7\u53d6\u66f4\u9ad8\u7684\u8ba1\u7b97\u6027\u80fd\uff08\u4fe1\u606f\u5904\u7406\u80fd\u529b\uff09\uff0c\u6211\u4eec\u5c31\u5fc5\u987b\u63a2\u7d22\u53e6\u5916\u4e00\u6761\u9053\u8def\u2014\u2014\u5e76\u884c\u5904\u7406\u3002GPU\u5728\u5e94\u7528\u4e8e\u56fe\u50cf\u5904\u7406\u9886\u7528\uff0c\u5176CUDA\u5e73\u53f0\u7684\u652f\u6301\uff0c\u5bf9\u4e8e\u6d6e\u70b9\u8fd0\u7b97\u7684\u9ad8\u6548\uff0c\u56e0\u800c\u4f5c\u4e3a\u5e76\u884c\u4fe1\u606f\u5904\u7406\u7684\u6280\u672f\u88ab\u5e7f\u6cdb\u5e94\u7528\u3002<\/p>\n\n\n\n<p>\u5173\u952e\u8bcd<\/p>\n\n\n\n<p>GPU\uff0cCUDA \uff0c\u5e76\u884c\u4fe1\u606f\u5904\u7406<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a>1. <\/a>\u5e76\u884c\u5904\u7406\u6280\u672f<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><a>1.1 <\/a>\u5e76\u884c\u5904\u7406\u6280\u672f\u4ecb\u7ecd<\/h4>\n\n\n\n<p>\u5e76\u884c\u5904\u7406\u6216\u5e76\u884c\u8ba1\u7b97\u662f\u6307\u5229\u7528\u591a\u53f0\u8ba1\u7b97\u673a\u6216\u5904\u7406\u5668\u540c\u65f6\u6267\u884c\u8fd0\u7b97\u4efb\u52a1\uff0c\u4ece\u800c\u51cf\u5c11\u89e3\u51b3\u95ee\u9898\u6240\u9700\u8981\u7684\u65f6\u95f4\u3002\u4e00\u822c\u53ef\u5206\u4e3a\u65f6\u95f4\u5e76\u884c\u8ba1\u7b97\u548c\u7a7a\u95f4\u5e76\u884c\u8ba1\u7b97\u3002<\/p>\n\n\n\n<p>\u65f6\u95f4\u4e0a\u7684\u5e76\u884c\u8ba1\u7b97\u53eb\u505a\u6d41\u6c34\u7ebf\u5904\u7406\uff0c\u5373\u591a\u4e2a\u5904\u7406\u5668\u6309\u7167\u5904\u7406\u65f6\u95f4\u7684\u5148\u540e\u987a\u5e8f\u6267\u884c\u8ba1\u7b97\uff1b\u7a7a\u95f4\u4e0a\u7684\u5e76\u884c\u662f\u6307\u591a\u4e2a\u5904\u7406\u5668\u540c\u65f6\u6267\u884c\u8ba1\u7b97\uff0c\u5404\u5904\u7406\u5668\u5728\u65f6\u95f4\u4e0a\u76f8\u4e92\u72ec\u7acb\u3002\u5e76\u884c\u5904\u7406\u6280\u672f\u4e3b\u8981\u7814\u7a76\u7a7a\u95f4\u4e0a\u7684\u5e76\u884c\uff0c\u5373\u901a\u8fc7\u603b\u7ebf\u65b9\u5f0f\u5c06\u591a\u4e2a\u8ba1\u7b97\u673a\u6216\u5904\u7406\u5668\u5e76\u8054\uff0c\u4ece\u800c\u83b7\u5f97\u66f4\u5feb\u7684\u5904\u7406\u901f\u5ea6\u3002<\/p>\n\n\n\n<p>\u5e76\u884c\u8ba1\u7b97\u6839\u636e\u89c4\u6a21\u4e0d\u540c\uff0c\u5206\u4e3a\u4e00\u4e0b\u51e0\u4e2a\u5c42\u6b21\u3002\u5982\u56fe\u6240\u793a\uff0c\u6700\u5e95\u5c42\u662f\u5355\u6838\u6307\u4ee4\u7ea7\u5e76\u884c\uff08ILP\uff09\uff0c\u5373\u5355\u4e2a\u5904\u7406\u5668\uff0c\u4f46\u53ef\u540c\u65f6\u6267\u884c\u591a\u6761\u6307\u4ee4\uff1b\u5176\u4e0a\u4e3a\u591a\u6838\u5e76\u884c\uff0c\u5373\u5355\u82af\u7247\u62e5\u6709\u591a\u4e2a\u5904\u7406\u5668\u6838\u5fc3\uff1b\u518d\u5f80\u4e0a\u662f\u591a\u5904\u7406\u5668\u5e76\u884c\uff0c\u5373\u901a\u8fc7\u591a\u4e2a\u82af\u7247\u4e4b\u95f4\u5206\u5de5\u534f\u4f5c\u505a\u5230\u5e76\u884c\u5904\u7406\uff1b\u6700\u4e0a\u5c42\u4e3a\u96c6\u7fa4\u6216\u5206\u5e03\u5f0f\u5e76\u884c\uff0c\u901a\u8fc7\u7f51\u7edc\u4e92\u8054\u5b9e\u73b0\u8d85\u5927\u89c4\u6a21\u5e76\u884c\u8fd0\u7b97\uff0c\u53ef\u53c2\u8003\u5927\u578b\u6570\u636e\u4e2d\u5fc3\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\"\/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><a>1.2 Flynn<\/a>\u8ba1\u7b97\u673a\u4f53\u7cfb\u5206\u7c7b<\/h4>\n\n\n\n<p>1966\u5e74\uff0cFlynn\u6839\u636e\u6307\u4ee4\u6d41\u548c\u6570\u636e\u6d41\u7684\u591a\u500d\u6027\u5bf9\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u8fdb\u884c\u4e86\u5206\u7c7b\u3002\u5206\u4e3a\u5355\u6307\u4ee4\u6d41\u5355\u6570\u636e\u6d41\u6a21\u5f0f\uff08SISD\uff09\uff0c\u5355\u6307\u4ee4\u6d41\u591a\u6570\u636e\u6d41\u6a21\u5f0f\uff08SIMD\uff09\uff0c\u591a\u6307\u4ee4\u6d41\u5355\u6570\u636e\u6d41\u6a21\u5f0f\uff08MISD\uff09\uff0c\u591a\u6307\u4ee4\u6d41\u591a\u6570\u636e\u6d41\u6a21\u5f0f\uff08MIMD\uff09\u3002\u5176\u4e2dSIMD\u548cMIMD\u5c5e\u4e8e\u5e76\u884c\u5904\u7406\u5668\u3002<\/p>\n\n\n\n<p>SIMD\u548cMIMD\u5904\u7406\u5668\u7ed3\u6784\u793a\u610f\u56fe\u5982\u56fe\u6240\u793a\u3002SIMD\u53ea\u6709\u4e00\u4e2a\u63a7\u5236\u5355\u5143\uff0c\u8fd9\u4e2a\u63a7\u5236\u5355\u5143\u63a7\u5236\u591a\u4e2a\u8ba1\u7b97\u5904\u7406\u5355\u5143\uff0c\u8fd9\u4e9b\u5904\u7406\u5355\u5143\u5171\u4eab\u5b58\u50a8\u5668\u6216\u4fe1\u53f7\u8fdb\u884c\u901a\u4fe1\u3002MIMD\u5904\u7406\u5668\u62e5\u6709\u591a\u4e2a\u63a7\u5236\u5355\u5143\uff0c\u6bcf\u4e2a\u63a7\u5236\u5355\u5143\u63a7\u5236\u81ea\u5df1\u7684\u8ba1\u7b97\u5355\u5143\uff0c\u901a\u8fc7\u5171\u4eab\u5b58\u50a8\u5668\u6216\u4fe1\u53f7\u8fdb\u884c\u901a\u4fe1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175641.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175641.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\"\/><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a>2.CUDA GPU<\/a>\u5e76\u884c\u67b6\u6784<\/h3>\n\n\n\n<p>CUDA\u662f\u8bbe\u5907\u8ba1\u7b97\u7edf\u4e00\u6846\u67b6\u7684\u7b80\u79f0\uff08Compute Unified Device Architecture\uff09\u3002\u5176\u76ee\u7684\u662f\u4e3a\u4e86\u7528C\u8bed\u8a00\u518dGPU\u4e0a\u8fdb\u884c\u7f16\u7a0b\uff0c\u800c\u65e0\u9700\u5173\u6ce8\u56fe\u5f62API\u548cGPU\u7f16\u7a0b\u7684\u77e5\u8bc6\u3002\u5b83\u53ef\u4ee5\u8fd0\u884c\u548c\u8bbf\u95eeGPU\u8bbe\u5907\u7684\u6307\u4ee4\u548c\u5b58\u50a8\u7a7a\u95f4\uff0c\u4ece\u800c\u53ef\u4ee5\u975e\u5e38\u5feb\u901f\u5165\u95e8\u5e76\u4e14\u4eceGPU\u7684\u5e76\u884c\u8ba1\u7b97\u4e2d\u83b7\u5229\u3002\u518d\u6b64\u4e4b\u524d\uff0cGPGPU\u7f16\u7a0b\u9700\u8981\u9488\u5bf9\u7279\u5b9a\u7684\u5904\u7406\u5668\uff0c\u800c\u4e0d\u662f\u6807\u51c6\u7684API\uff0c\u4e0d\u80fd\u5728\u4e0d\u540cGPU\u4e4b\u95f4\u8fdb\u884c\u79fb\u690d\u3002\u5728CUDA\u5e76\u884c\u67b6\u6784\u4e2d\uff0cGPU\u88ab\u5f53\u4f5cCPU\u7684\u534f\u5904\u7406\u5668\u6765\u8fd0\u4f5c\uff0c\u4e00\u4e9b\u6570\u636e\u5e76\u884c\u72ec\u7acb\u4e14\u8ba1\u7b97\u5bc6\u96c6\u7684\u51fd\u6570\u9002\u5408\u653e\u5165GPU\u4e2d\u8fd0\u884c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/1670979347577.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/1670979347577.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\"\/><\/div><\/figure>\n\n\n\n<p>\u56fe\u4e3aCUDA\u5e76\u884c\u67b6\u6784\u6846\u56fe\u3002\u5e95\u5c42\u4e3aCUDA\u7684\u7ec4\u6210\u90e8\u4ef6\uff0c\u5176\u5305\u62ec\uff1a\u652f\u6301CUDA\u5e76\u884c\u8ba1\u7b97\u7684GPU\u3001\u652f\u6301CUDA\u7684\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u3001\u7528\u6237\u6a21\u5f0f\u9a71\u52a8\u3001PTX\u5e76\u884c\u8ba1\u7b97\u6307\u4ee4\u96c6\u3002<\/p>\n\n\n\n<p>\u5728\u8f6f\u4ef6\u5c42\u6b21\uff0cCUDA\u63d0\u4f9b\u4e86\u5b8c\u5907\u7684\u8f6f\u4ef6\u5f00\u53d1\u73af\u5883\uff0c\u5305\u62ec\u7f16\u8bd1\u5668\u3001\u8c03\u8bd5\u5668\u3001\u6027\u80fd\u6d4b\u8bc4\u5de5\u5177\u53ca\u57fa\u7840\u5e93\u3002\u5e76\u4e14\u652f\u6301C\u8bed\u8a00\u7f16\u7a0b\uff0c\u4ece\u800c\u53ef\u4ee5\u652f\u6301\u5176\u4ed6\u9ad8\u7ea7\u8bed\u8a00\uff0c\u6bd4\u5982Java\u548cPython\u3002CUDA\u63d0\u4f9b\u4e86\u4e24\u79cd\u7f16\u7a0b\u63a5\u53e3\uff1a\u8bbe\u5907\u7ea7\u7f16\u7a0b\u63a5\u53e3\u548c\u8bed\u8a00\u96c6\u6210\u7f16\u7a0b\u63a5\u53e3\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a>3. CUDA <\/a>\u786c\u4ef6\u539f\u7406<\/h3>\n\n\n\n<p>CUDA \u786c\u4ef6\u57fa\u7840\u7ed3\u6784\u7531\u4e00\u7ec4\u591a\u7ebf\u7a0b\u6d41\u5904\u7406\u5668\uff08SM\uff0cMultitreaded Stream Multiprocessors\uff09\u7684\u5355\u5143\u7ec4\u6210\u3002\u5982\u56fe\u6240\u793a\uff0cSM\u4e2d\u53c8\u6709\u591a\u4e2aSP\uff08Stream Processors\uff09\u8d1f\u8d23\u5177\u4f53\u8fd0\u7b97\u3002\u591a\u7ebf\u7a0b\u6d41\u5904\u7406\u5668SM\u88ab\u8bbe\u8ba1\u6210\u62e5\u6709\u53ef\u4ee5\u540c\u65f6\u6267\u884c\u4e0a\u767e\u4e2a\u7ebf\u7a0b\u7684\u80fd\u529b\u3002\u4e3a\u4e86\u83b7\u5f97\u540c\u65f6\u6267\u884c\u8fd9\u4e48\u591a\u7ebf\u7a0b\u7684\u80fd\u529b\uff0cCUDA\u4eceSIMD\u7ed3\u6784\u4e0a\u53d1\u5c55\u51fa\u5355\u6307\u4ee4\u6d41\u591a\u7ebf\u7a0b\uff08SIMT, Single Instruction Multiple Thread\uff09\u7ed3\u6784\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/1670980424949.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/1670980424949.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\"\/><\/div><\/figure>\n\n\n\n<p>SM\u591a\u7ebf\u7a0b\u5904\u7406\u5668\u8d1f\u8d23\u521b\u5efa\u3001\u8c03\u5ea6\u548c\u6267\u884c\u7ebf\u7a0b\uff0c\u8fd9\u4e9b\u7ebf\u7a0b\u4ee532\u4e2a\u4e3a\u4e00\u7ec4\uff0c\u6210\u4e3a\u4e00\u4e2aWarp\u3002\u7ec4\u6210\u540c\u4e00\u4e2aWarp\u7684\u5355\u72ec\u7ebf\u7a0b\u4ece\u540c\u4e00\u4e2a\u7a0b\u5e8f\u5730\u5740\u6267\u884c\u3002\u4f46\u662f\u4ed6\u4eec\u62e5\u6709\u5355\u72ec\u7684\u6307\u4ee4\u5730\u5740\u8ba1\u6570\u5668\u548c\u72ec\u7acb\u7684\u5b58\u50a8\u5668\u3002\u6240\u4ee5\u4ed6\u4eec\u53ef\u4ee5\u4e92\u4e0d\u5e72\u6270\u7684\u8fd0\u884c\u5404\u81ea\u7684\u6307\u4ee4\u53ca\u5206\u652f\u3002<\/p>\n\n\n\n<p>\u5f53\u591a\u7ebf\u7a0b\u5904\u7406\u5668\u6267\u884c\u4e00\u4e2a\u6216\u591a\u4e2a\u7ebf\u7a0b\u5757\u65f6\uff0c\u5b83\u628a\u4ed6\u4eec\u5206\u4e3a\u72ec\u7acb\u7684Warp\uff0c\u4e4b\u540e\u7531Warp\u8c03\u5ea6\u5668\u8fdb\u884c\u8c03\u5ea6\u3002\u7ebf\u7a0b\u5757\u4e2d\u7684\u7ebf\u7a0b\u6839\u636e\u7ebf\u7a0b\u53f7\u7ebf\u6027\u7684\u5206\u7ec4\u4e3aWarp\uff0c\u5373\u524d32\u4e2a\u7ebf\u7a0b\u53f7\u7684\u7ebf\u7a0b\u4e3a\u7b2c\u4e00\u4e2aWarp\uff0c\u63a5\u4e0b\u676532\u4e2a\u7ebf\u7a0b\u53f7\u4e3a\u7b2c\u4e8c\u4e2aWarp\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\u4e00\u4e2aWarp\u5185\u7684\u7ebf\u7a0b\u6bcf\u6b21\u6267\u884c\u4e00\u6761\u6307\u4ee4\uff0c\u6240\u4ee5\u5982\u679cWarp\u91cc\u768432\u4e2a\u7ebf\u7a0b\u5728\u6267\u884c\u65f6\u6267\u884c\u76f8\u540c\u7684\u6307\u4ee4\u8def\u5f84\u53ef\u4ee5\u4f7f\u6548\u7387\u6700\u5927\u5316\u3002\u5982\u679c\u4e00\u4e2aWarp\u4e2d\u7684\u7ebf\u7a0b\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u4ea7\u751f\u4e86\u5206\u652f\uff0c\u5219Warp\u987a\u5e8f\u6267\u884c\u5b8c\u6bcf\u4e2a\u5206\u652f\uff0c\u76f4\u5230\u6240\u6709\u5206\u652f\u90fd\u6267\u884c\u5b8c\u6bd5\u540e\u4f1a\u548c\u5230\u540c\u4e00\u4e2a\u6307\u4ee4\u5f00\u59cb\u6267\u884c\u3002\u4e0d\u540c\u7684Warp\u5404\u81ea\u72ec\u7acb\u8fd0\u884c\uff0c\u5728\u4e00\u4e2aWarp\u5185\u4ea7\u751f\u7684\u5206\u652f\u4e0d\u5f71\u54cd\u5176\u4ed6\u7684Warp\u3002\u5bf9\u4e8e\u4e00\u4e2a\u7279\u5b9a\u7684\u7ebf\u7a0b\u5757\uff0c\u5b83\u53ea\u80fd\u5728\u4e00\u4e2a\u591a\u7ebf\u7a0b\u5904\u7406\u5668\uff08SM\uff09\u4e2d\u6267\u884c\u3002\u4f46\u662f\u4e00\u4e2a\u591a\u7ebf\u7a0b\u5904\u7406\u5668\u53ef\u4ee5\u6267\u884c\u591a\u4e2a\u7ebf\u7a0b\u5757\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981 \u968f\u7740\u524d\u7aef\u6570\u636e\u91c7\u96c6\u8bbe\u5907\u7cbe\u5ea6\u7684\u4e0d\u65ad\u63d0\u9ad8\uff0c\u5bf9\u4fe1\u606f\u5904\u7406\u7cfb\u7edf\u7684\u5b9e\u65f6\u6027\u3001\u51c6\u786e\u6027\u63d0\u51fa\u66f4\u9ad8\u7684\u8981\u6c42\u3002\u800c\u4ece\u65e5\u8d8b\u5b8c\u5584\u7684\u8ba1\u7b97\u673a\u4f53 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528 &ndash; Laning &#039;s Blog<\/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:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528 &ndash; Laning &#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"\u6458\u8981 \u968f\u7740\u524d\u7aef\u6570\u636e\u91c7\u96c6\u8bbe\u5907\u7cbe\u5ea6\u7684\u4e0d\u65ad\u63d0\u9ad8\uff0c\u5bf9\u4fe1\u606f\u5904\u7406\u7cfb\u7edf\u7684\u5b9e\u65f6\u6027\u3001\u51c6\u786e\u6027\u63d0\u51fa\u66f4\u9ad8\u7684\u8981\u6c42\u3002\u800c\u4ece\u65e5\u8d8b\u5b8c\u5584\u7684\u8ba1\u7b97\u673a\u4f53 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/\" \/>\n<meta property=\"og:site_name\" content=\"Laning &#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-19T08:36:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-14T11:37:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"laning\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.laning.org\/#website\",\"url\":\"https:\/\/blog.laning.org\/\",\"name\":\"\\u8fa3\\u5b81\\u7684\\u535a\\u5ba2\",\"description\":\"Learning on the go\",\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.laning.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\\u56fe\\u724720221213175703.png\",\"contentUrl\":\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\\u56fe\\u724720221213175703.png\",\"width\":463,\"height\":345},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage\",\"url\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/\",\"name\":\"GPU\\u5728\\u5e76\\u884c\\u4fe1\\u606f\\u5904\\u7406\\u4e2d\\u7684\\u5e94\\u7528 &ndash; Laning &#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage\"},\"datePublished\":\"2022-12-19T08:36:26+00:00\",\"dateModified\":\"2024-04-14T11:37:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"https:\/\/blog.laning.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GPU\\u5728\\u5e76\\u884c\\u4fe1\\u606f\\u5904\\u7406\\u4e2d\\u7684\\u5e94\\u7528\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage\"},\"author\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"headline\":\"GPU\\u5728\\u5e76\\u884c\\u4fe1\\u606f\\u5904\\u7406\\u4e2d\\u7684\\u5e94\\u7528\",\"datePublished\":\"2022-12-19T08:36:26+00:00\",\"dateModified\":\"2024-04-14T11:37:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage\"},\"wordCount\":83,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"image\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\\u56fe\\u724720221213175703.png\",\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\",\"name\":\"laning\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.laning.org\/#personlogo\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"caption\":\"laning\"},\"logo\":{\"@id\":\"https:\/\/blog.laning.org\/#personlogo\"},\"sameAs\":[\"https:\/\/blog.laning.org\"],\"url\":\"https:\/\/blog.laning.org\/index.php\/author\/laning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528 &ndash; Laning &#039;s Blog","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:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/","og_locale":"zh_CN","og_type":"article","og_title":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528 &ndash; Laning &#039;s Blog","og_description":"\u6458\u8981 \u968f\u7740\u524d\u7aef\u6570\u636e\u91c7\u96c6\u8bbe\u5907\u7cbe\u5ea6\u7684\u4e0d\u65ad\u63d0\u9ad8\uff0c\u5bf9\u4fe1\u606f\u5904\u7406\u7cfb\u7edf\u7684\u5b9e\u65f6\u6027\u3001\u51c6\u786e\u6027\u63d0\u51fa\u66f4\u9ad8\u7684\u8981\u6c42\u3002\u800c\u4ece\u65e5\u8d8b\u5b8c\u5584\u7684\u8ba1\u7b97\u673a\u4f53 [&hellip;]","og_url":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/","og_site_name":"Laning &#039;s Blog","article_published_time":"2022-12-19T08:36:26+00:00","article_modified_time":"2024-04-14T11:37:43+00:00","og_image":[{"url":"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"laning","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/blog.laning.org\/#website","url":"https:\/\/blog.laning.org\/","name":"\u8fa3\u5b81\u7684\u535a\u5ba2","description":"Learning on the go","publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.laning.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"ImageObject","@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage","inLanguage":"zh-CN","url":"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png","contentUrl":"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png","width":463,"height":345},{"@type":"WebPage","@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage","url":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/","name":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528 &ndash; Laning &#039;s Blog","isPartOf":{"@id":"https:\/\/blog.laning.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage"},"datePublished":"2022-12-19T08:36:26+00:00","dateModified":"2024-04-14T11:37:43+00:00","breadcrumb":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/blog.laning.org\/"},{"@type":"ListItem","position":2,"name":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528"}]},{"@type":"Article","@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#article","isPartOf":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage"},"author":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"headline":"GPU\u5728\u5e76\u884c\u4fe1\u606f\u5904\u7406\u4e2d\u7684\u5e94\u7528","datePublished":"2022-12-19T08:36:26+00:00","dateModified":"2024-04-14T11:37:43+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#webpage"},"wordCount":83,"commentCount":0,"publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"image":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.laning.org\/wp-content\/uploads\/2022\/12\/QQ\u56fe\u724720221213175703.png","articleSection":["Linux"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.laning.org\/index.php\/2022\/12\/19\/116\/#respond"]}]},{"@type":["Person","Organization"],"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93","name":"laning","image":{"@type":"ImageObject","@id":"https:\/\/blog.laning.org\/#personlogo","inLanguage":"zh-CN","url":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","caption":"laning"},"logo":{"@id":"https:\/\/blog.laning.org\/#personlogo"},"sameAs":["https:\/\/blog.laning.org"],"url":"https:\/\/blog.laning.org\/index.php\/author\/laning\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/116"}],"collection":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":3,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/116\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}