{"id":263,"date":"2020-12-13T23:36:50","date_gmt":"2020-12-13T15:36:50","guid":{"rendered":"http:\/\/8.154.33.202\/?p=263"},"modified":"2020-12-15T00:24:14","modified_gmt":"2020-12-14T16:24:14","slug":"%e5%ae%89%e8%a3%85cuda-10-1","status":"publish","type":"post","link":"http:\/\/8.154.33.202\/?p=263","title":{"rendered":"\u5b89\u88c5cuda 10.1\u53cacuDNN"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.cnblogs.com\/zongfa\/p\/13947071.html\">https:\/\/www.cnblogs.com\/zongfa\/p\/13947071.html<\/a><\/p>\n\n\n\n<p>\u6211\u5b89\u88c5\u7684\u663e\u5361\u7684\u9a71\u52a8\u7248\u672c\u662f455\uff0c\u4f7f\u7528nvidia-smi\u770b\u5230\u8be5\u9a71\u52a8\u652f\u6301\u7684\u6700\u9ad8cuda\u7248\u672c\u4e3a11.1\uff0c\u56e0\u6b64\u53ef\u4ee5\u5b89\u88c5cuda10.1<\/p>\n\n\n\n<p>Ubuntu20.04\u81ea\u5e26\u7684gcc\u7248\u672c\u4e3a9.3\uff0c\u800ccuda10.1\u4e0d\u652f\u6301gcc-9\uff0c\u56e0\u6b64\u8981\u624b\u52a8\u5b89\u88c5gcc-7\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>sudo apt-get install gcc-7 g++-7<\/p>\n\n\n\n<p>\u5b89\u88c5\u5b8cgcc-7\uff0c\u7cfb\u7edf\u4e2d\u5c31\u5b58\u5728\u4e24\u4e2a\u7248\u672c\u7684gcc\uff08g++\uff09\uff0c\u56e0\u6b64\u8981\u8bbe\u7f6e\u9ed8\u8ba4\u7684gcc\u548cg++\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo update-alternatives --install \/usr\/bin\/gcc gcc \/usr\/bin\/gcc-7 9\nsudo update-alternatives --install \/usr\/bin\/gcc gcc \/usr\/bin\/gcc-9 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo update-alternatives --install \/usr\/bin\/g++ g++ \/usr\/bin\/g++-7 9\nsudo update-alternatives --install \/usr\/bin\/g++ g++ \/usr\/bin\/g++-9 1<\/code><\/pre>\n\n\n\n<p>\u663e\u793ag++\u4f18\u5148\u7ea7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo update-alternatives --display g++<\/code><\/pre>\n\n\n\n<p>\u53bb\u5b98\u7f51\u4e0b\u8f7dcuda10.1\u7684\u5b89\u88c5\u6587\u4ef6 <a href=\"http:\/\/cuda\u4e0b\u8f7d\">cuda\u4e0b\u8f7d<\/a><a rel=\"noreferrer noopener\" aria-label=\"\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\" href=\"https:\/\/developer.nvidia.com\/cuda-toolkit-archive\" target=\"_blank\">\u3002<\/a>\u4f7f\u7528run\u6587\u4ef6\u5b89\u88c5\uff08\u4f7f\u7528deb\u6587\u4ef6\u4f1a\u81ea\u52a8\u5b89\u88c5\u663e\u5361\u9a71\u52a8\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.loli.net\/2020\/11\/09\/YK4HRsfn5oZVLkS.png\" alt=\"cuda.png\"\/><\/figure>\n\n\n\n<p>\u5b89\u88c5\u754c\u9762\u542f\u52a8\uff0c\u76f4\u63a5\u9009\u62e9continue\uff0c\u7136\u540eaccept\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.loli.net\/2020\/11\/09\/eNSZ4EmMAOGoxnb.jpg\" alt=\"cuda.jpg\"\/><\/figure>\n\n\n\n<p>\u5230\u8fd9\u4e00\u6b65\u65f6\u6ce8\u610f\uff0c\u56e0\u4e3a\u6211\u4eec\u5df2\u7ecf\u6709\u5b89\u88c5\u4e86\u9a71\u52a8\uff0c\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528\u7a7a\u683c\u9009\u4e2ddriver\uff0c\u53d6\u6d88\u9a71\u52a8\u5b89\u88c5\u3002\u7136\u540e\u79fb\u52a8\u6700\u4e0b\u9762install\uff0c\u56de\u8f66\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5\u597d\u540e\uff0c\u53ef\u53d1\u73b0\u6709\u4e86\/usr\/local\/cuda-10.1\u8fd9\u4e2a\u6587\u4ef6\u5939\uff0c\u4e5f\u5c31\u662f\u5b89\u88c5\u8def\u5f84\u6240\u5728\u3002\u6839\u636e\u5b89\u88c5\u5b8c\u6210\u7684\u63d0\u793a\uff0c\u9700\u8981\u8fdb\u884c\u76f8\u5173\u8def\u5f84\u914d\u7f6e\u3002\u5728~\/.bashrc\u4e2d\u8fdb\u884c\u6dfb\u52a0\u5373\u53ef<\/p>\n\n\n\n<p><strong>\u5b89\u88c5cudnn<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/developer.nvidia.com\/rdp\/cudnn-archive\">\u4e0b\u8f7dcudnn<\/a>\u3002\u767b\u5f55\u4e0b\u8f7d\u4e0ecuda10.1\u5bf9\u5e94\u7684cudnn 7.6.5\uff0c\u9009\u62e9cudnn library for linux\u3002\u4e0b\u8f7d\u597d\u540e\u8fdb\u884c\u89e3\u538b\uff0c\u5c06\u89e3\u538b\u7684 cuda\/include\/cudnn.h \u590d\u5236\u5230 \/usr\/local\/cuda\/include\uff0ccuda\/lib64\/\u4e0b\u6240\u6709\u6587\u4ef6\u590d\u5236\u5230 \/usr\/local\/cuda\/lib64 \u4e0b\uff0c\u5e76\u4e3a\u8fd9\u4e9b\u6587\u4ef6\u6dfb\u52a0\u8bfb\u53d6\u548c\u6267\u884c\u6743\u9650\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 755 \/usr\/local\/cuda\/include\/cudnn.h \/usr\/local\/cuda\/lib64\/libcudnn*<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.cnblogs.com\/zongfa\/p\/13947071.html \u6211\u5b89\u88c5\u7684\u663e\u5361\u7684\u9a71 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/8.154.33.202\/?p=263\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u5b89\u88c5cuda 10.1\u53cacuDNN\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-263","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/posts\/263"}],"collection":[{"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/8.154.33.202\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=263"}],"version-history":[{"count":3,"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":266,"href":"http:\/\/8.154.33.202\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions\/266"}],"wp:attachment":[{"href":"http:\/\/8.154.33.202\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/8.154.33.202\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/8.154.33.202\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}