{"id":2096,"date":"2019-01-15T11:05:00","date_gmt":"2019-01-15T11:05:00","guid":{"rendered":""},"modified":"2019-01-15T19:05:24","modified_gmt":"2019-01-15T11:05:24","slug":"gpu%e5%a6%82%e4%bd%95%e5%8a%a0%e5%bf%ab%e8%bd%af%e4%bb%b6%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%bf%90%e8%a1%8c%e9%80%9f%e5%ba%a6","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2096","title":{"rendered":"GPU\u5982\u4f55\u52a0\u5feb\u8f6f\u4ef6\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6"},"content":{"rendered":"
\n\tCPU<\/u>\u548cGPU<\/u>\u4e4b\u6240\u4ee5\u5927\u4e0d\u76f8\u540c\uff0c\u662f\u7531\u4e8e\u5176\u8bbe\u8ba1\u76ee\u6807\u7684\u4e0d\u540c\uff0c\u5b83\u4eec\u5206\u522b\u9488\u5bf9\u4e86\u4e24\u79cd\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002CPU\u9700\u8981\u5f88\u5f3a\u7684\u901a\u7528\u6027\u6765\u5904\u7406\u5404\u79cd\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u540c\u65f6\u53c8\u8981\u903b\u8f91\u5224\u65ad\u53c8\u4f1a\u5f15\u5165\u5927\u91cf\u7684\u5206\u652f\u8df3\u8f6c\u548c\u4e2d\u65ad\u7684\u5904\u7406\u3002\u8fd9\u4e9b\u90fd\u4f7f\u5f97CPU\u7684\u5185\u90e8\u7ed3\u6784\u5f02\u5e38\u590d\u6742\u3002\u800cGPU\u9762\u5bf9\u7684\u5219\u662f\u7c7b\u578b\u9ad8\u5ea6\u7edf\u4e00\u7684\u3001\u76f8\u4e92\u65e0\u4f9d\u8d56\u7684\u5927\u89c4\u6a21\u6570\u636e\u548c\u4e0d\u9700\u8981\u88ab\u6253\u65ad\u7684\u7eaf\u51c0\u7684\u8ba1\u7b97\u73af\u5883\u3002<\/p>\n
\n\t<\/p>\n
\n\t\u8fd9\u4e2a\u89c6\u9891\uff0c\u975e\u5e38\u5177\u8c61\u7684\u8868\u8ff0\u4e86CPU\u548cGPU\u5728\u56fe\u50cf\u5904\u7406\u65f6\u7684\u4e0d\u540c\u7684\u539f\u7406\u548c\u65b9\u6cd5\u3002\u770b\u5230GPU\u7684\u6a21\u578b\u55b7\u5c04\u51fa\u7684\u4e00\u77ac\u95f4\uff0c\u4f60\u5c31\u79d2\u61c2\u4e86\u3002<\/p>\n
\n\t\u6839\u636e\u4e0a\u9762\u89c6\u9891\u4e2d\u7684\u6bd4\u55bb\uff0c\u4f60\u5e94\u8be5\u5f88\u6e05\u695aCPU\u548cGPU\u5c31\u5448\u73b0\u51fa\u975e\u5e38\u4e0d\u540c\u7684\u67b6\u6784\uff1a<\/p>\n
\n\t<\/p>\n
\n\t\u7eff\u8272\u7684\u662f\u8ba1\u7b97\u5355\u5143<\/p>\n
\n\t\u6a59\u7ea2\u8272\u7684\u662f\u5b58\u50a8\u5355\u5143<\/p>\n
\n\t\u6a59\u9ec4\u8272\u7684\u662f\u63a7\u5236\u5355\u5143<\/p>\n
\n\tGPU\u91c7\u7528\u4e86\u6570\u91cf\u4f17\u591a\u7684\u8ba1\u7b97\u5355\u5143\u548c\u8d85\u957f\u7684\u6d41\u6c34\u7ebf\uff0c\u4f46\u53ea\u6709\u975e\u5e38\u7b80\u5355\u7684\u63a7\u5236\u903b\u8f91\u5e76\u7701\u53bb\u4e86Cache\u3002\u800cCPU\u4e0d\u4ec5\u88abCache\u5360\u636e\u4e86\u5927\u91cf\u7a7a\u95f4\uff0c\u800c\u4e14\u8fd8\u6709\u6709\u590d\u6742\u7684\u63a7\u5236\u903b\u8f91\u548c\u8bf8\u591a\u4f18\u5316\u7535\u8def\uff0c\u76f8\u6bd4\u4e4b\u4e0b\u8ba1\u7b97\u80fd\u529b\u53ea\u662fCPU\u5f88\u5c0f\u7684\u4e00\u90e8\u5206\u3002<\/p>\n
\n\tGPU \u5982\u4f55\u52a0\u5feb\u8f6f\u4ef6\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6<\/p>\n
\n\tGPU \u52a0\u901f\u8ba1<\/u>\u7b97\u53ef\u4ee5\u63d0\u4f9b\u975e\u51e1\u7684\u5e94\u7528\u7a0b\u5e8f\u6027\u80fd\uff0c\u80fd\u5c06\u5e94\u7528\u7a0b\u5e8f\u8ba1\u7b97\u5bc6\u96c6\u90e8\u5206\u7684\u5de5\u4f5c\u8d1f\u8f7d\u8f6c\u79fb\u5230 GPU\uff0c\u540c\u65f6\u4ecd\u7531 CPU \u8fd0\u884c\u5176\u4f59\u7a0b\u5e8f\u4ee3\u7801\u3002\u4ece\u7528\u6237\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6\u660e\u663e\u52a0\u5feb.<\/p>\n
\n\t<\/p>\n
\n\t<\/p>\n
\n\tGPU \u4e0e CPU \u6027\u80fd\u6bd4\u8f83<\/p>\n
\n\t\u7406\u89e3 GPU \u548c CPU \u4e4b\u95f4\u533a\u522b\u7684\u4e00\u79cd\u7b80\u5355\u65b9\u5f0f\u662f\u6bd4\u8f83\u5b83\u4eec\u5982\u4f55\u5904\u7406\u4efb\u52a1\u3002CPU \u7531\u4e13\u4e3a\u987a\u5e8f\u4e32\u884c\u5904\u7406\u800c\u4f18\u5316\u7684\u51e0\u4e2a\u6838\u5fc3\u7ec4\u6210\uff0c\u800c GPU \u5219\u62e5\u6709\u4e00\u4e2a\u7531\u6570\u4ee5\u5343\u8ba1\u7684\u66f4\u5c0f\u3001\u66f4\u9ad8\u6548\u7684\u6838\u5fc3\uff08\u4e13\u4e3a\u540c\u65f6\u5904\u7406\u591a\u91cd\u4efb\u52a1\u800c\u8bbe\u8ba1\uff09\u7ec4\u6210\u7684\u5927\u89c4\u6a21\u5e76\u884c\u8ba1\u7b97\u67b6\u6784\u3002<\/p>\n
\n\t<\/p>\n
\n\t\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u51fa\uff1a<\/p>\n
\n\tCache, local memory\uff1a CPU > GPU<\/p>\n
\n\tThreads(\u7ebf\u7a0b\u6570): GPU > CPU<\/p>\n
\n\tRegiste<\/u>rs<\/u>: GPU > CPU <\/p>\n
\n\tSIMD Unit(\u5355\u6307\u4ee4\u591a\u6570\u636e\u6d41,\u4ee5\u540c\u6b65\u65b9\u5f0f\uff0c\u5728\u540c\u4e00\u65f6\u95f4\u5185\u6267\u884c\u540c\u4e00\u6761\u6307\u4ee4): GPU > CPU\u3002<\/p>\n
\n\tCPU \u57fa\u4e8e\u4f4e\u5ef6\u65f6\u7684\u8bbe\u8ba1\uff1a<\/p>\n
\n\t<\/p>\n
\n\tCPU\u6709\u5f3a\u5927\u7684ALU\uff08\u7b97\u672f\u8fd0\u7b97\u5355\u5143\uff09,\u5b83\u53ef\u4ee5\u5728\u5f88\u5c11\u7684\u65f6\u949f<\/u>\u5468\u671f\u5185\u5b8c\u6210\u7b97\u672f\u8ba1\u7b97\u3002<\/p>\n
\n\t\u5f53\u4eca\u7684CPU\u53ef\u4ee5\u8fbe\u523064bit \u53cc\u7cbe\u5ea6\u3002\u6267\u884c\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6e90\u7b97\u7684\u52a0\u6cd5\u548c\u4e58\u6cd5\u53ea\u9700\u89811\uff5e3\u4e2a\u65f6\u949f\u5468\u671f\u3002<\/p>\n
\n\tCPU\u7684\u65f6\u949f\u5468\u671f\u7684\u9891\u7387\u662f\u975e\u5e38\u9ad8\u7684\uff0c\u8fbe\u52301.532\uff5e3gigahertz(\u5343\u5146HZ, 10\u76849\u6b21\u65b9).<\/p>\n
\n\t\u5927\u7684\u7f13\u5b58\u4e5f\u53ef\u4ee5\u964d\u4f4e\u5ef6\u65f6\u3002\u4fdd\u5b58\u5f88\u591a\u7684\u6570\u636e\u653e\u5728\u7f13\u5b58\u91cc\u9762\uff0c\u5f53\u9700\u8981\u8bbf\u95ee\u7684\u8fd9\u4e9b\u6570\u636e\uff0c\u53ea\u8981\u5728\u4e4b\u524d\u8bbf\u95ee\u8fc7\u7684\uff0c\u5982\u4eca\u76f4\u63a5\u5728\u7f13\u5b58\u91cc\u9762\u53d6\u5373\u53ef\u3002<\/p>\n
\n\t\u590d\u6742\u7684\u903b\u8f91\u63a7\u5236\u5355\u5143\u3002\u5f53\u7a0b\u5e8f\u542b\u6709\u591a\u4e2a\u5206\u652f\u7684\u65f6\u5019\uff0c\u5b83\u901a\u8fc7\u63d0\u4f9b\u5206\u652f\u9884\u6d4b\u7684\u80fd\u529b\u6765\u964d\u4f4e\u5ef6\u65f6\u3002<\/p>\n
\n\t\u6570\u636e\u8f6c\u53d1\u3002 \u5f53\u4e00\u4e9b\u6307\u4ee4\u4f9d\u8d56\u524d\u9762\u7684\u6307\u4ee4\u7ed3\u679c\u65f6\uff0c\u6570\u636e\u8f6c\u53d1\u7684\u903b\u8f91\u63a7\u5236\u5355\u5143\u51b3\u5b9a\u8fd9\u4e9b\u6307\u4ee4\u5728pi<\/u>peline\u4e2d\u7684\u4f4d\u7f6e\u5e76\u4e14\u5c3d\u53ef\u80fd\u5feb\u7684\u8f6c\u53d1\u4e00\u4e2a\u6307\u4ee4\u7684\u7ed3\u679c\u7ed9\u540e\u7eed\u7684\u6307\u4ee4\u3002\u8fd9\u4e9b\u52a8\u4f5c\u9700\u8981\u5f88\u591a\u7684\u5bf9\u6bd4\u7535\u8def\u5355\u5143\u548c\u8f6c\u53d1\u7535\u8def\u5355\u5143\u3002<\/p>\n
\n\tGPU\u662f\u57fa\u4e8e\u5927\u7684\u541e\u5410\u91cf\u8bbe\u8ba1<\/p>\n
\n\t<\/p>\n
\n\tGPU\u7684\u7279\u70b9\u662f\u6709\u5f88\u591a\u7684ALU\u548c\u5f88\u5c11\u7684cache. \u7f13\u5b58\u7684\u76ee\u7684\u4e0d\u662f\u4fdd\u5b58\u540e\u9762\u9700\u8981\u8bbf\u95ee\u7684\u6570\u636e\u7684\uff0c\u8fd9\u70b9\u548cCPU\u4e0d\u540c\uff0c\u800c\u662f\u4e3athread\u63d0\u9ad8\u670d\u52a1\u7684\u3002\u5982\u679c\u6709\u5f88\u591a\u7ebf\u7a0b\u9700\u8981\u8bbf\u95ee\u540c\u4e00\u4e2a\u76f8\u540c\u7684\u6570\u636e\uff0c\u7f13\u5b58\u4f1a\u5408\u5e76\u8fd9\u4e9b\u8bbf\u95ee\uff0c\u7136\u540e\u518d\u53bb\u8bbf\u95eedram<\/u>\uff08\u56e0\u4e3a\u9700\u8981\u8bbf\u95ee\u7684\u6570\u636e\u4fdd\u5b58\u5728dram<\/u>\u4e2d\u800c\u4e0d\u662fcache\u91cc\u9762\uff09\uff0c\u83b7\u53d6\u6570\u636e\u540ecache\u4f1a\u8f6c\u53d1\u8fd9\u4e2a\u6570\u636e\u7ed9\u5bf9\u5e94\u7684\u7ebf\u7a0b\uff0c\u8fd9\u4e2a\u65f6\u5019\u662f\u6570\u636e\u8f6c\u53d1\u7684\u89d2\u8272\u3002\u4f46\u662f\u7531\u4e8e\u9700\u8981\u8bbf\u95eedram\uff0c\u81ea\u7136\u4f1a\u5e26\u6765\u5ef6\u65f6\u7684\u95ee\u9898\u3002<\/p>\n
\n\tGPU\u7684\u63a7\u5236\u5355\u5143\uff08\u5de6\u8fb9\u9ec4\u8272\u533a\u57df\u5757\uff09\u53ef\u4ee5\u628a\u591a\u4e2a\u7684\u8bbf\u95ee\u5408\u5e76\u6210\u5c11\u7684\u8bbf\u95ee\u3002<\/p>\n
\n\tGPU\u7684\u867d\u7136\u6709dram\u5ef6\u65f6\uff0c\u5374\u6709\u975e\u5e38\u591a\u7684ALU\u548c\u975e\u5e38\u591a\u7684thread. \u4e3a\u5566\u5e73\u8861\u5185\u5b58\u5ef6\u65f6\u7684\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4e2d\u5145\u5206\u5229\u7528\u591a\u7684ALU\u7684\u7279\u6027\u8fbe\u5230\u4e00\u4e2a\u975e\u5e38\u5927\u7684\u541e\u5410\u91cf\u7684\u6548\u679c\u3002\u5c3d\u53ef\u80fd\u591a\u7684\u5206\u914d\u591a\u7684Threads.\u901a\u5e38\u6765\u770bGPU ALU\u4f1a\u6709\u975e\u5e38\u91cd\u7684pipeline\u5c31\u662f\u56e0\u4e3a\u8fd9\u6837\u3002<\/p>\n
\n\t\u6240\u4ee5\u4e0eCPU\u64c5\u957f\u903b\u8f91\u63a7\u5236\uff0c\u4e32\u884c\u7684\u8fd0\u7b97\u3002\u548c\u901a\u7528\u7c7b\u578b\u6570\u636e\u8fd0\u7b97\u4e0d\u540c\uff0cGPU\u64c5\u957f\u7684\u662f\u5927\u89c4\u6a21\u5e76\u53d1\u8ba1\u7b97\uff0c\u8fd9\u4e5f\u6b63\u662f\u5bc6\u7801\u7834\u89e3\u7b49\u6240\u9700\u8981\u7684\u3002\u6240\u4ee5GPU\u9664\u4e86\u56fe\u50cf\u5904\u7406\uff0c\u4e5f\u8d8a\u6765\u8d8a\u591a\u7684\u53c2\u4e0e\u5230\u8ba1\u7b97\u5f53\u4e2d\u6765\u3002<\/p>\n
\n\tGPU\u7684\u5de5\u4f5c\u5927\u90e8\u5206\u5c31\u662f\u8fd9\u6837\uff0c\u8ba1\u7b97\u91cf\u5927\uff0c\u4f46\u6ca1\u4ec0\u4e48\u6280\u672f\u542b\u91cf\uff0c\u800c\u4e14\u8981\u91cd\u590d\u5f88\u591a\u5f88\u591a\u6b21\u3002\u5c31\u50cf\u4f60\u6709\u4e2a\u5de5\u4f5c\u9700\u8981\u7b97\u51e0\u4ebf\u6b21\u4e00\u767e\u4ee5\u5185\u52a0\u51cf\u4e58\u9664\u4e00\u6837\uff0c\u6700\u597d\u7684\u529e\u6cd5\u5c31\u662f\u96c7\u4e0a\u51e0\u5341\u4e2a\u5c0f\u5b66\u751f\u4e00\u8d77\u7b97\uff0c\u4e00\u4eba\u7b97\u4e00\u90e8\u5206\uff0c\u53cd\u6b63\u8fd9\u4e9b\u8ba1\u7b97\u4e5f\u6ca1\u4ec0\u4e48\u6280\u672f\u542b\u91cf\uff0c\u7eaf\u7cb9\u4f53\u529b\u6d3b\u800c\u5df2\u3002\u800cCPU\u5c31\u50cf\u8001\u6559\u6388\uff0c\u79ef\u5206\u5fae\u5206\u90fd\u4f1a\u7b97\uff0c\u5c31\u662f\u5de5\u8d44\u9ad8\uff0c\u4e00\u4e2a\u8001\u6559\u6388\u8d44\u9876\u4e8c\u5341\u4e2a\u5c0f\u5b66\u751f\uff0c\u4f60\u8981\u662f\u5bcc\u58eb\u5eb7\u4f60\u96c7\u54ea\u4e2a\uff1fGPU\u5c31\u662f\u8fd9\u6837\uff0c\u7528\u5f88\u591a\u7b80\u5355\u7684\u8ba1\u7b97\u5355\u5143\u53bb\u5b8c\u6210\u5927\u91cf\u7684\u8ba1\u7b97\u4efb\u52a1\uff0c\u7eaf\u7cb9\u7684\u4eba\u6d77\u6218\u672f\u3002\u8fd9\u79cd\u7b56\u7565\u57fa\u4e8e\u4e00\u4e2a\u524d\u63d0\uff0c\u5c31\u662f\u5c0f\u5b66\u751fA\u548c\u5c0f\u5b66\u751fB\u7684\u5de5\u4f5c\u6ca1\u6709\u4ec0\u4e48\u4f9d\u8d56\u6027\uff0c\u662f\u4e92\u76f8\u72ec\u7acb\u7684\u3002\u5f88\u591a\u6d89\u53ca\u5230\u5927\u91cf\u8ba1\u7b97\u7684\u95ee\u9898\u57fa\u672c\u90fd\u6709\u8fd9\u79cd\u7279\u6027\uff0c\u6bd4\u5982\u4f60\u8bf4\u7684\u7834\u89e3\u5bc6\u7801\uff0c\u6316\u77ff\u548c\u5f88\u591a\u56fe\u5f62\u5b66\u7684\u8ba1\u7b97\u3002\u8fd9\u4e9b\u8ba1\u7b97\u53ef\u4ee5\u5206\u89e3\u4e3a\u591a\u4e2a\u76f8\u540c\u7684\u7b80\u5355\u5c0f\u4efb\u52a1\uff0c\u6bcf\u4e2a\u4efb\u52a1\u5c31\u53ef\u4ee5\u5206\u7ed9\u4e00\u4e2a\u5c0f\u5b66\u751f\u53bb\u505a\u3002\u4f46\u8fd8\u6709\u4e00\u4e9b\u4efb\u52a1\u6d89\u53ca\u5230“\u6d41”\u7684\u95ee\u9898\u3002\u6bd4\u5982\u4f60\u53bb\u76f8\u4eb2\uff0c\u53cc\u65b9\u770b\u7740\u987a\u773c\u624d\u80fd\u7ee7\u7eed\u53d1\u5c55\u3002\u603b\u4e0d\u80fd\u4f60\u8fd9\u8fb9\u8fd8\u6ca1\u89c1\u9762\u5462\uff0c\u90a3\u8fb9\u627e\u4eba\u628a\u8bc1\u90fd\u7ed9\u9886\u4e86\u3002\u8fd9\u79cd\u6bd4\u8f83\u590d\u6742\u7684\u95ee\u9898\u90fd\u662fCPU\u6765\u505a\u7684\u3002<\/p>\n
\n\t\u603b\u800c\u8a00\u4e4b\uff0cCPU\u548cGPU\u56e0\u4e3a\u6700\u521d\u7528\u6765\u5904\u7406\u7684\u4efb\u52a1\u5c31\u4e0d\u540c\uff0c\u6240\u4ee5\u8bbe\u8ba1\u4e0a\u6709\u4e0d\u5c0f\u7684\u533a\u522b\u3002\u800c\u67d0\u4e9b\u4efb\u52a1\u548cGPU\u6700\u521d\u7528\u6765\u89e3\u51b3\u7684\u95ee\u9898\u6bd4\u8f83\u76f8\u4f3c\uff0c\u6240\u4ee5\u7528GPU\u6765\u7b97\u4e86\u3002GPU\u7684\u8fd0\u7b97\u901f\u5ea6\u53d6\u51b3\u4e8e\u96c7\u4e86\u591a\u5c11\u5c0f\u5b66\u751f\uff0cCPU\u7684\u8fd0\u7b97\u901f\u5ea6\u53d6\u51b3\u4e8e\u8bf7\u4e86\u591a\u4e48\u5389\u5bb3\u7684\u6559\u6388\u3002\u6559\u6388\u5904\u7406\u590d\u6742\u4efb\u52a1\u7684\u80fd\u529b\u662f\u78be\u538b\u5c0f\u5b66\u751f\u7684\uff0c\u4f46\u662f\u5bf9\u4e8e\u6ca1\u90a3\u4e48\u590d\u6742\u7684\u4efb\u52a1\uff0c\u8fd8\u662f\u9876\u4e0d\u4f4f\u4eba\u591a\u3002\u5f53\u7136\u73b0\u5728\u7684GPU\u4e5f\u80fd\u505a\u4e00\u4e9b\u7a0d\u5fae\u590d\u6742\u7684\u5de5\u4f5c\u4e86\uff0c\u76f8\u5f53\u4e8e\u5347\u7ea7\u6210\u521d\u4e2d\u751f\u9ad8\u4e2d\u751f\u7684\u6c34\u5e73\u3002\u4f46\u8fd8\u9700\u8981CPU\u6765\u628a\u6570\u636e\u5582\u5230\u5634\u8fb9\u624d\u80fd\u5f00\u59cb\u5e72\u6d3b\uff0c\u7a76\u7adf\u8fd8\u662f\u9760CPU\u6765\u7ba1\u7684\u3002<\/p>\n
\n\t\u4ec0\u4e48\u7c7b\u578b\u7684\u7a0b\u5e8f\u9002\u5408\u5728GPU\u4e0a\u8fd0\u884c\uff1f<\/p>\n
\n\t\uff081\uff09\u8ba1\u7b97\u5bc6\u96c6\u578b\u7684\u7a0b\u5e8f\u3002\u6240\u8c13\u8ba1\u7b97\u5bc6\u96c6\u578b(Compute-intensive)\u7684\u7a0b\u5e8f\uff0c\u5c31\u662f\u5176\u5927\u90e8\u5206\u8fd0\u884c\u65f6\u95f4\u82b1\u5728\u4e86\u5bc4\u5b58\u5668<\/u>\u8fd0\u7b97\u4e0a\uff0c\u5bc4\u5b58\u5668\u7684\u901f\u5ea6\u548c\u5904\u7406\u5668\u7684\u901f\u5ea6\u76f8\u5f53\uff0c\u4ece\u5bc4\u5b58\u5668\u8bfb\u5199\u6570\u636e\u51e0\u4e4e\u6ca1\u6709\u5ef6\u65f6\u3002\u53ef\u4ee5\u505a\u4e00\u4e0b\u5bf9\u6bd4\uff0c\u8bfb\u5185\u5b58\u7684\u5ef6\u8fdf\u5927\u6982\u662f\u51e0\u767e\u4e2a\u65f6\u949f\u5468\u671f\uff1b\u8bfb\u786c\u76d8\u7684\u901f\u5ea6\u5c31\u4e0d\u8bf4\u4e86\uff0c\u5373\u4fbf\u662fSSD, \u4e5f\u5b9e\u5728\u662f\u592a\u6162\u4e86\u3002<\/p>\n
\n\t\uff082\uff09\u6613\u4e8e\u5e76\u884c\u7684\u7a0b\u5e8f\u3002GPU\u5176\u5b9e\u662f\u4e00\u79cdSIMD(Single Instructi<\/u>on Multiple Data)\u67b6\u6784\uff0c \u4ed6\u6709\u6210\u767e\u4e0a\u5343\u4e2a\u6838\uff0c\u6bcf\u4e00\u4e2a\u6838\u5728\u540c\u4e00\u65f6\u95f4\u6700\u597d\u80fd\u505a\u540c\u6837\u7684\u4e8b\u60c5\u3002<\/p>\n
\n\tCPU\u4f1a\u5229\u7528\u8f83\u9ad8\u7684\u4e3b\u9891\u3001cache\u3001\u5206\u652f\u9884\u6d4b\u7b49\u6280\u672f\uff0c\u4f7f\u5904\u7406\u6bcf\u6761\u6307\u4ee4\u6240\u9700\u7684\u65f6\u95f4\u5c3d\u53ef\u80fd\u5c11\uff0c\u4ece\u800c\u51cf\u4f4e\u5177\u6709\u590d\u6742\u8df3\u8f6c\u5206\u652f\u7a0b\u5e8f\u6267\u884c\u6240\u9700\u7684\u65f6\u95f4\u3002GPU\u5219\u901a\u8fc7\u6570\u91cf\u4e27\u5fc3\u75c5\u72c2\u7684\u6d41\u5904\u7406\u5668\u5b9e\u73b0\u5927\u91cf\u7ebf\u7a0b\u5e76\u884c\uff0c\u4f7f\u540c\u65f6\u8d70\u4e00\u6761\u6307\u4ee4\u7684\u6570\u636e\u53d8\u591a\uff0c\u4ece\u800c\u63d0\u9ad8\u6570\u636e\u7684\u541e\u5410\u91cf\u3002<\/p>\n
\n\t\u4e3e\u4e2aGPU\u901a\u7528\u8ba1\u7b97\u6559\u6750\u4e0a\u6bd4\u8f83\u5e38\u89c1\u7684\u4f8b\u5b50\uff0c\u4e00\u4e2a\u5411\u91cf\u76f8\u52a0\u7684\u7a0b\u5e8f\uff0c\u4f60\u53ef\u4ee5\u8ba9CPU\u8dd1\u4e00\u4e2a\u5faa\u73af\uff0c\u6bcf\u4e2a\u5faa\u73af\u5bf9\u4e00\u4e2a\u5206\u91cf\u505a\u52a0\u6cd5\uff0c\u4e5f\u53ef\u4ee5\u8ba9GPU\u540c\u65f6\u5f00\u5927\u91cf\u7ebf\u7a0b\uff0c\u6bcf\u4e2a\u5e76\u884c\u7684\u7ebf\u7a0b\u5bf9\u5e94\u4e00\u4e2a\u5206\u91cf\u7684\u76f8\u52a0\u3002CPU\u8dd1\u5faa\u73af\u7684\u65f6\u5019\u6bcf\u6761\u6307\u4ee4\u6240\u9700\u65f6\u95f4\u4e00\u822c\u4f4e\u4e8eGPU\uff0c\u4f46GPU\u56e0\u4e3a\u53ef\u4ee5\u5f00\u5927\u91cf\u7684\u7ebf\u7a0b\u5e76\u884c\u5730\u8dd1\uff0c\u5177\u6709SIMD\uff08\u51c6\u786e\u5730\u8bf4\u662fSIMT\uff09\u7684\u4f18\u52bf\u3002<\/p>\n
\n\t\u518d\u4ee5\u6316BIT\u5e01\u4e3e\u4f8b\uff1a<\/p>\n
\n\t<\/p>\n
\n\t\u6bd4\u7279\u5e01<\/u>\u7684\u6316\u77ff\u548c\u8282\u70b9\u8f6f\u4ef6\u662f\u57fa\u4e8eP2P\u7f51\u7edc\u3001\u6570\u5b57\u7b7e\u540d\u3001\u5bc6\u7801\u5b66\u8bc1\u636e\u6765\u53d1\u8d77\u548c\u9a8c\u8bc1\u4ea4\u6613\u7684\u3002\u8282\u70b9\u5411\u7f51\u7edc\u5e7f\u64ad\u4ea4\u6613\uff0c\u8fd9\u4e9b\u5e7f\u64ad\u51fa\u6765\u7684\u4ea4\u6613\u5728\u7ecf\u8fc7\u77ff\u5de5\u7684\u9a8c\u8bc1\u540e\uff0c\u77ff\u5de5\u7528\u81ea\u5df1\u7684\u5de5\u4f5c\u8bc1\u660e\u7ed3\u679c\u6765\u8868\u8fbe\u786e\u8ba4\uff0c\u786e\u8ba4\u540e\u7684\u4ea4\u6613\u4f1a\u88ab\u6253\u5305\u5230\u6570\u636e\u5757\u4e2d\uff0c\u6570\u636e\u5757\u4f1a\u4e32\u8d77\u6765\u5f62\u6210\u8fde\u7eed\u7684\u6570\u636e\u5757\u94fe\u3002<\/p>\n
\n\t<\/p>\n
\n\t\u6bcf\u4e00\u4e2a\u6bd4\u7279\u5e01\u7684\u8282\u70b9\u90fd\u4f1a\u6536\u96c6\u6240\u6709\u5c1a\u672a\u786e\u8ba4\u7684\u4ea4\u6613\uff0c\u5e76\u5c06\u5176\u5f52\u96c6\u5230\u4e00\u4e2a\u6570\u636e\u5757\u4e2d\uff0c\u8fd9\u4e2a\u6570\u636e\u5757\u4f1a\u548c\u524d\u9762\u4e00\u4e2a\u6570\u636e\u5757\u96c6\u6210\u5728\u4e00\u8d77\u3002\u77ff\u5de5\u8282\u70b9\u4f1a\u9644\u52a0\u4e00\u4e2a\u968f\u673a\u8c03\u6574\u6570\uff0c\u5e76\u8ba1\u7b97\u524d\u4e00\u4e2a\u6570\u636e\u5757\u7684SHA-256\u54c8\u5e0c\u8fd0\u7b97\u503c\u3002\u6316\u77ff\u8282\u70b9\u4e0d\u65ad\u91cd\u590d\u8fdb\u884c\u5c1d\u8bd5\uff0c\u76f4\u5230\u5b83\u627e\u5230\u7684\u968f\u673a\u8c03\u6574\u6570\u4f7f\u5f97\u4ea7\u751f\u7684\u54c8\u5e0c\u503c\u4f4e\u4e8e\u67d0\u4e2a\u7279\u5b9a\u7684\u76ee\u6807\u3002<\/p>\n
\n\t<\/p>\n
\n\t\u5982\u679c\u5e0c\u671b\u5224\u5b9a\u4e00\u4e2a\u4eba\u63d0\u4f9b\u7684\u7684\u4fe1\u606f\u662f\u672c\u7740\u6b63\u5e38\u4f7f\u7528\uff0c\u5177\u5907\u4e00\u5b9a\u4ef7\u503c\u7684\u3002\u90a3\u4e48\u6211\u4eec\u503e\u5411\u8ba4\u4e3a\u63d0\u4f9b\u8fd9\u4e2a\u4fe1\u606f\u7684\u4eba\uff0c\u613f\u610f\u4e3a\u6b64\u4ed8\u51fa\u4e00\u5b9a\u5de5\u4f5c\u91cf\u6765\u8bc1\u660e\u4ed6\u7684\u8bda\u5b9e\u3002\u5047\u5982\u6709\u4e00\u79cd\u673a\u5236\uff0c\u80fd\u591f\u5bb9\u6613\u7684\u8bc1\u660e\u63d0\u4f9b\u4fe1\u606f\u7684\u4eba\u4e3a\u6b64\u4ed8\u51fa\u4e86\u4e00\u5b9a\u5de5\u4f5c\u91cf\uff0c\u90a3\u4e48\u6b64\u4fe1\u606f\u662f\u53ef\u4ee5\u63a5\u53d7\uff0c\u5e76\u88ab\u8ba4\u4e3a\u5408\u7406\u7684\u3002<\/p>\n
\n\t\u6bd4\u5982\uff0c\u6211\u6536\u90ae\u4ef6\u7684\u65f6\u5019\uff0c\u505a\u4e86\u4e00\u4e2a\u89c4\u5b9a\uff1a“\u628a\u90ae\u4ef6\u5185\u5bb9\u6570\u636e\uff0c\u52a0\u5165\u4e00\u4e2a\u968f\u673a\u6570\uff0c\u6c42\u4e00\u4e2asha256\u6563\u5217\u6570\u503c\u3002\u8fd9\u4e2a\u6563\u5217\u503c\u4e00\u5171256bit \u3002\u524d20bit \u5fc5\u987b\u90fd\u4e3a0”.\u8fd9\u6837\uff0c\u8981\u7ed9\u6211\u53d1\u4fe1\u7684\u4eba\uff0c\u5c31\u5fc5\u987b\u53cd\u590d\u5c1d\u8bd5\u4e00\u4e2a\u968f\u673a\u6570\uff0c\u4ee5\u4fdd\u8bc1\u90ae\u4ef6\u5185\u5bb9\u6570\u636e\u52a0\u4e0a\u8fd9\u4e2a\u968f\u673a\u6570\uff0c\u80fd\u591f\u4ea7\u751fsha256 \u7684\u7ed3\u679c------\u524d20bit \u90fd\u662f0.(\u8fd9\u4e2a\u8ba1\u7b97\u8fc7\u7a0b\u672c\u8eab\u6beb\u65e0\u610f\u4e49)\u3002\u5982\u4f55\u4ea7\u751f\u51fa\u6307\u5b9a\u8981\u6c42\u7684\u6574\u6570\uff1f\u5b8c\u5168\u9760\u8fd0\u6c14\u548cCPU \u8fd0\u7b97\u65f6\u95f4\u3002\u8fd9\u5c31\u662f\u4e00\u4e2a\u5de5\u4f5c\u91cf\u3002\u5de5\u4f5c\u672c\u8eab\u6beb\u65e0\u610f\u4e49\u3002\u4f46\u662f\u5982\u679c\u8c01\u613f\u610f\u4ed8\u51fa\u8fd9\u4e2a\u5de5\u4f5c\u91cf\uff0c\u5c31\u610f\u5473\u7740\u4ed6\u7ed9\u6211\u7684\u90ae\u4ef6\u591a\u534a\u662f\u6709\u610f\u4e49\u7684\u3002\u8fd9\u5c31\u53eb“\u5de5\u4f5c\u91cf\u8bc1\u660e”\u3002\u4e5f\u5c31\u662f\u610f\u5473\u7740\u8fd9\u4e2a\u4eba\u5f88\u6709\u53ef\u80fd\u662f\u8bda\u5b9e\u7684\u3002\u8fd9\u91cc\u628a\u90ae\u4ef6\u6362\u6210Block\u4e5f\u662f\u7b49\u6548\u7684\u3002\u8fd9\u4e2a\u673a\u5236\u88ab\u5e7f\u6cdb\u7528\u4e8e\u9632\u6b62\u5783\u573e\u90ae\u4ef6\u7b49\u3002\u56e0\u4e3a\u7fa4\u53d1\u5783\u573e\u90ae\u4ef6\u7684\u4eba\uff0c\u4e0d\u53ef\u80fd\u6709\u90a3\u4e48\u591a\u65f6\u95f4\u53bb\u7ed9\u6bcf\u4e2a\u4eba\u7b97\u4e00\u4e2a\u6beb\u65e0\u610f\u4e49\u7684\u6570\u5b57\uff0c\u6d6a\u8d39\u65f6\u95f4\uff0c\u964d\u4f4e\u53d1\u5783\u573e\u90ae\u4ef6\u7684\u6548\u7387\u3002\u6316\u77ff\u7684\u76ee\u7684\u662f\u786e\u8ba4\u4ea4\u6613\u3002\u5bfb\u627e\u968f\u673a\u6570\u7684\u8fc7\u7a0b\u662f\u4e3a\u4e86\u4fdd\u8bc1\u6bcf\u4e00\u4e2a\u6316\u77ff\u8282\u70b9\u4e0d\u4f1a\u5f80\u5916\u53d1\u9001\u5783\u573eblock\u3002\u53d1\u9001\u7684BlockId\u662f\u8fd9\u4e2aBlock\u7684Hash\uff0c\u5b83\u5fc5\u7136\u662f\u999620bit\u4e3a0\u7684\u3002<\/p>\n
\n\t\u53ef\u4ee5\u9884\u89c1\u7684\u662f\u5bf9\u4e8e\u6bd4\u7279\u5e01\u7684Hash\u8ba1\u7b97\u800c\u8a00\uff0c\u5b83\u51e0\u4e4e\u90fd\u662f\u72ec\u7acb\u5e76\u53d1\u7684\u6574\u6570\u8ba1\u7b97\uff0cGPU\u7b80\u76f4\u5c31\u662f\u4e3a\u4e86\u8fd9\u4e2a\u800c\u8bbe\u8ba1\u751f\u4ea7\u51fa\u6765\u7684\u3002\u76f8\u6bd4\u8f83CPU\u53ef\u601c\u76842-8\u7ebf\u7a0b\u548c\u957f\u5ea6\u60ca\u4eba\u7684\u63a7\u5236\u5224\u65ad\u548c\u8c03\u5ea6\u5206\u652f\uff0cGPU\u53ef\u4ee5\u8f7b\u6613\u7684\u8fdb\u884c\u6570\u767e\u4e2a\u7ebf\u7a0b\u7684\u6574\u6570\u8ba1\u7b97\u5e76\u53d1\uff08\u65e0\u9700\u4efb\u4f55\u5224\u65ad\u7684\u65e0\u8111\u66b4\u529b\u7834\u89e3\u4e43\u662fA\u5361\u7684\u5f3a\u9879\uff09\u3002 OpenCL\u53ef\u4ee5\u5229\u7528GPU\u5728\u7247\u7684\u5927\u91cfunified shader\u90fd\u53ef\u4ee5\u7528\u6765\u4f5c\u4e3a\u6574\u6570\u8ba1\u7b97\u7684\u8d44\u6e90\u3002\u800cA\u5361\u7684shader\uff08\u6d41\u5904\u7406\u5668\uff09\u8d44\u6e90\u53c8\u662fN\u7684\u6570\u500d\uff08\u540c\u7b49\u7ea7\u522b\u7684\u5361\uff09\u3002<\/p>\n
\n\t\u6bd4\u7279\u5e01\u65e9\u671f\u901a\u8fc7CPU\u6765\u83b7\u53d6\uff0c\u800c\u968f\u7740GPU\u901a\u7528\u8ba1\u7b97\u7684\u4f18\u52bf\u4e0d\u65ad\u663e\u73b0\u4ee5\u53caGPU\u901f\u5ea6\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u77ff\u5de5\u4eec\u9010\u6e10\u5f00\u59cb\u4f7f\u7528GPU\u53d6\u4ee3CPU\u8fdb\u884c\u6316\u77ff\u3002\u524d\u9762\u6211\u4eec\u5df2\u7ecf\u4ecb\u7ecd\uff0c\u6bd4\u7279\u5e01\u6316\u77ff\u91c7\u7528\u7684\u662fSHA-256\u54c8\u5e0c\u503c\u8fd0\u7b97\uff0c\u8fd9\u79cd\u7b97\u6cd5\u4f1a\u8fdb\u884c\u5927\u91cf\u768432\u4f4d\u6574\u6570\u5faa\u73af\u53f3\u79fb\u8fd0\u7b97\u3002\u6709\u8da3\u7684\u662f\uff0c\u8fd9\u79cd\u7b97\u6cd5\u64cd\u4f5c\u5728AMD<\/u> GPU\u91cc\u53ef\u4ee5\u901a\u8fc7\u5355\u4e00\u786c\u4ef6\u6307\u4ee4\u5b9e\u73b0\uff0c\u800c\u5728NVIDIA GPU\u91cc\u5219\u9700\u8981\u4e09\u6b21\u786c\u4ef6\u6307\u4ee4\u6765\u6a21\u62df\uff0c\u4ec5\u8fd9\u4e00\u6761\u5c31\u4e3aAMD GPU\u5e26\u6765\u989d\u5916\u76841.7\u500d\u7684\u8fd0\u7b97\u6548\u7387\u4f18\u52bf\u3002\u51ed\u501f\u8fd9\u79cd\u4f18\u52bf\uff0cAMD GPU\u56e0\u6b64\u6df1\u53d7\u5e7f\u5927\u77ff\u5de5\u9752\u7750\u3002<\/p>\n
\n\t\u73b0\u5728\u4f60\u77e5\u9053\u4e3a\u4ec0\u4e48AMD\u641e\u5f97\u8ddf\u84dd\u7fd4\u6280\u6821\u4f3c\u5f97\u4e86\u5427\uff1f<\/p>\n
\n\t<\/p>\n","protected":false},"excerpt":{"rendered":"
CPU \u548c GPU \u4e4b\u6240\u4ee5\u5927\u4e0d\u76f8\u540c\uff0c\u662f\u7531\u4e8e\u5176\u8bbe\u8ba1\u76ee\u6807\u7684\u4e0d\u540c\uff0c\u5b83\u4eec\u5206\u522b\u9488\u5bf9\u4e86\u4e24\u79cd\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002CPU\u9700\u8981\u5f88\u5f3a\u7684\u901a\u7528\u6027\u6765\u5904\u7406\u5404\u79cd\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u540c\u65f6\u53c8\u8981\u903b\u8f91\u5224\u65ad\u53c8\u4f1a\u5f15\u5165\u5927\u91cf\u7684\u5206\u652f\u8df3<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2096"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2096"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2096\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2096"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}