{"id":357,"date":"2009-11-28T01:09:40","date_gmt":"2009-11-28T08:09:40","guid":{"rendered":"http:\/\/www.cchsu.com\/arthur\/?p=357"},"modified":"2009-11-28T01:09:40","modified_gmt":"2009-11-28T08:09:40","slug":"%e8%99%8e%e7%80%be%e9%9b%86-cpu-gpu-gpgpu","status":"publish","type":"post","link":"http:\/\/www.cchsu.com\/arthur\/2009\/11\/28\/357\/","title":{"rendered":"\u864e\u703e\u96c6: CPU, GPU, GPGPU"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u5927\u62dc\u62dc\u5b78\u5230\u4e00\u4e9b\u65b0\u6771\u897f\uff0c\u8981\u8d81 memory leak \u4e4b\u524d\u8d95\u5feb\u4f86\u864e\u703e\u4e00\u4e0b\u3002\u9019\u5e74\u982d\u96a8\u4fbf\u4e00\u53f0\u8c93\u72d7\u96fb\u8166\u88e1\u53ef\u80fd\u90fd\u6709\u4e00\u9846\u7070\u718a\u7d66\u4ed6\u5920\u529b\u7684 GPU\uff0c\u5b83\u9664\u4e86\u6253 game \u4e4b\u5916\u9084\u6709\u4ec0\u9ebc\u7528\u9014\u5462\uff1f\u9019\u5c31\u662f\u963f\u5b85\u5011\u7684\u65b0\u76ee\u6a19\u4e86\uff0c\u8981\u628a\u82b1\u51fa\u53bb\u7684\u9280\u5169\u69a8\u51fa\u6700\u5927\u7684\u5269\u9918\u50f9\u503c\u3002\u4e0d\u904e\u5728\u9019\u4e4b\u524d\uff0c\u8981\u5148\u641e\u6e05\u695a GPU \u53ef\u4ee5\u505a\u4ec0\u9ebc\u3002<\/p>\n<p>GPU \u548c x86\/x64 CPU \u6700\u5927\u7684\u4e0d\u540c\u662f\uff0cGPU \u64c5\u9577\u65bc\u8cc7\u6599\u7684\u5e73\u884c\u8655\u7406\u3002\u8981\u69a8\u51fa GPU \u7684\u6548\u80fd\uff0c\u4e1f\u7d66\u5b83\u7684\u6771\u897f\u5fc5\u9808\u6eff\u8db3\u4ee5\u4e0b\u7684\u689d\u4ef6:<\/p>\n<ul>\n<li>thread \u8981\u5f88\u591a (>1000)<\/li>\n<li>\u8cc7\u6599\u5c01\u5305 (data packet)  \u8981\u5c0f\uff0c32-64 byte \u5de6\u53f3\u7684\u70ba\u4f73<\/li>\n<li>\u6f14\u7b97\u6cd5\u672c\u8eab\u9069\u5408\u5e73\u884c\u8cc7\u6599\u8655\u7406\uff0c\u5982 FFT<\/li>\n<\/ul>\n<p>\u76ee\u524d\u628a\u8166\u7b4b\u52d5\u5230\u9592\u7f6e\u7684 GPU \u7684\u7a0b\u5f0f\u6f38\u6f38\u589e\u591a\uff0c\u6211\u5011\u6709\u5e0c\u671b\u5728\u56db\u3001\u4e94\u5e74\u5167\u770b\u5230\u4f9b\u9ad8\u968e\u8a9e\u8a00\u76f4\u63a5\u5957\u7528\u7684\u7a0b\u5f0f\u5eab (\u9019\u53e5\u8a71\u7684\u610f\u601d\u662f\uff0c\u73fe\u5728\u6c92\u6709\uff0c\u5c31\u7b97\u6709\uff0c\u4e5f\u4e0d\u5920\u6cdb\u578b)\u3002\u5f88\u591a\u4eba\u6703\u628a\u5e73\u884c\u8655\u7406 (parallel processing) \u76f4\u63a5\u548c\u5e73\u884c\u8cc7\u6599\u8655\u7406 (data-level parallel processing) \u756b\u4e0a\u7b49\u865f\uff0c\u9019\u662f\u4e0d\u5c0d\u7684\uff0c\u6709\u9019\u9ebc\u723d\u65e9\u5c31\u4e16\u754c\u548c\u5e73\u4e86\u3002\u5e73\u884c\u8655\u7406\u7684\u8056\u676f\u662f\u57f7\u884c\u7dd2\u5e73\u884c\u8655\u7406 (thread-level parallel processing)\uff0c\u727d\u626f\u5230 invariant state \u7b49\u7b49\u8907\u96dc\u7684\u554f\u984c\uff0c\u56e0\u6b64\u76ee\u524d\u5e73\u884c\u8655\u7406\u5927\u591a\u8457\u58a8\u65bc\u8cc7\u6599\u4e0a\u7684\u5e73\u884c\u8655\u7406 (\u56e0\u70ba\u6bd4\u8f03\u597d\u505a\u5bb9\u6613\u6210\u529f)\uff0c\u4f8b\u5982 FFT \u9019\u7a2e\u5929\u751f\u5c31\u9069\u5408\u7684\u6f14\u7b97\u6cd5\uff0c\u4e5f\u5c31\u662f\u8aaa\uff0c\u5c31\u7b97 GPU \u6539\u540d\u6210 GPGPU\uff0c\u5b83\u5176\u5be6\u53ef\u4ee5\u505a\u7684\u4e8b\u60c5\u4e5f\u4e0d\u6703\u662f general purpose \u7684\uff0c\u5b83\u4ecd\u7136\u8f03\u5408\u7528\u65bc\u7279\u6b8a\u7528\u9014\u7684\u6f14\u7b97\u6cd5\u3002<\/p>\n<p>\u57f7\u884c\u4e0a\u7684\u4e3b\u8981\u74f6\u9838\u9084\u662f\u4f86\u81ea I\/O\uff0c\u6700\u5927\u7684\u74f6\u9838\u662f\u600e\u9ebc\u5f9e main memory \u628a\u8cc7\u6599\u642c\u5230 graphics memory\uff0c\u518d\u642c\u56de\u4f86\u3002\u6709\u4e00\u6d3e\u7684\u7406\u8ad6\u662f\u628a GPU \u76f4\u63a5\u505a\u5230 CPU \u88e1\uff0c\u5927\u5bb6\u4e00\u8d77 share \u4e00\u5927\u584a DDR3 RAM &#8230; \u54b3\u54b3\uff0c\u7406\u60f3\u5f88\u7f8e\u9e97\uff0c\u73fe\u5be6\u5f88\u6b98\u9177\uff0cGPU \u4e00\u4e0b\u628a memory bandwidth \u9738\u4f54\u5149\uff0cCPU \u5c31\u53ef\u4ee5\u76f4\u63a5\u4f11\u606f\u4e86\u5594\u5475\u5475\u5475\u5475 &#8230; \u6240\u4ee5\u9084\u8981\u628a NUMA \u505a\u9032\u53bb\uff0c\u9019\u500b\u5c31 high \u7ffb\u4e86\u54c7\u54c8\u54c8 &#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u5e74\u982d\u96a8\u4fbf\u4e00\u53f0\u8c93\u72d7\u96fb\u8166\u88e1\u53ef\u80fd\u90fd\u6709\u4e00\u9846\u7070\u718a\u7d66\u4ed6\u5920\u529b\u7684 GPU\uff0c\u5b83\u9664\u4e86\u6253 game \u4e4b\u5916\u9084\u6709\u4ec0\u9ebc\u7528\u9014\u5462\uff1f\u9019\u5c31\u662f\u963f\u5b85\u5011\u7684\u65b0\u76ee\u6a19\u4e86 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/357"}],"collection":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":3,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":360,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/357\/revisions\/360"}],"wp:attachment":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}