{"id":201,"date":"2019-07-10T02:40:49","date_gmt":"2019-07-09T18:40:49","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=201"},"modified":"2019-07-10T10:27:41","modified_gmt":"2019-07-10T02:27:41","slug":"installcudnn","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2019\/07\/10\/installcudnn\/","title":{"rendered":"\u5b89\u88c5CUDNN"},"content":{"rendered":"<p>\u7eed\u63a5\u524d\u6587\uff1a<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"CfGZwzJvDH\"><p><a href=\"https:\/\/www.mustenaka.cn\/index.php\/2019\/07\/10\/removeoldvudaandinstallnew\/\">\u5378\u8f7d\u65e7\u7684cuda\u5b89\u88c5\u65b0\u7684cuda\u3010CUDA\u964d\u7ea7\u3011<\/a><\/p><\/blockquote>\n<p><iframe title=\"\u300a\u5378\u8f7d\u65e7\u7684cuda\u5b89\u88c5\u65b0\u7684cuda\u3010CUDA\u964d\u7ea7\u3011\u300b\u2014\u6728\u5341\u7684\u535a\u5ba2\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/www.mustenaka.cn\/index.php\/2019\/07\/10\/removeoldvudaandinstallnew\/embed\/#?secret=CfGZwzJvDH\" data-secret=\"CfGZwzJvDH\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u8fdb\u5165CUDNN\u7684\u4e0b\u8f7d\u5e93\u4e2d\u9009\u62e9\u4e00\u4e2a\u9002\u5408\u7684\u7248\u672c\uff1ahttps:\/\/developer.nvidia.com\/rdp\/cudnn-archive<\/p>\n<p>\u5982\u6211\u9009\u62e9\u7684\u662f <a href=\"https:\/\/developer.nvidia.com\/compute\/machine-learning\/cudnn\/secure\/v7.1.3\/prod\/9.0_20180414\/cudnn-9.0-linux-x64-v7.1\">cuDNN v7.1.3 Library for Linux<\/a> \u5bf9\u5e94\u7684CUDA\u7248\u672c\u662f9.0\u3002<\/p>\n<p>\u8fd9\u6837\u4e0b\u8f7d\u7684\u662f\u4e00\u4e2atgz\u538b\u7f29\u6587\u4ef6\uff0c\u6211\u4eec\u5728\u4e0b\u8f7d\u4e4b\u540e\u8fdb\u884c\u89e3\u538b\u7f29\u3002<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" bash=\"\">tar -zxvf cudnn-9.0-linux-x64-v7.1.tgz<\/code><\/pre>\n<p>\u7136\u540e\u5c06\u5176\u4e2d\u7684\u5e93\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u590d\u5236\u5373\u53ef\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" bash=\"\">sudo cp cuda\/lib64\/* \/usr\/local\/cuda\/lib64\/\r\nsudo cp cuda\/include\/* \/usr\/local\/cuda\/include\/\r\n\r\n#\u6216\u8005\uff1a\u8fd9\u51b3\u5b9a\u4e0e\u4f60\u7684\u73af\u5883\u53d8\u91cf\u5982\u4f55\u4e66\u5199\uff0c\u672c\u4eba\u4f7f\u7528\u4e0a\u9762\u7684\r\nsudo cp cuda\/lib64\/* \/usr\/local\/cuda-9.0\/lib64\/\r\nsudo cp cuda\/include\/* \/usr\/local\/cuda-9.0\/include\/<\/code><\/pre>\n<p>\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u67e5\u770bCUDNN\u7248\u672c\u53f7\u4fe1\u606f\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" bash=\"\">cat \/usr\/local\/cuda\/include\/cudnn.h | grep CUDNN_MAJOR -A 2<\/code><\/pre>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#define CUDNN_MAJOR 7\r\n#define CUDNN_MINOR 1\r\n#define CUDNN_PATCHLEVEL 3\r\n--\r\n#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)\r\n\r\n#include \"driver_types.h\"<\/code><\/pre>\n<p>\u5373\u8bf4\u660e\u6b63\u786e\uff0c\u5c1d\u8bd5\u5728python\u4e0bimport tensorflow\u6ca1\u6709\u62a5\u9519\u5373\u8bf4\u660e\u6df1\u5ea6\u5b66\u4e60GPU\u90e8\u5206\u5b89\u88c5\u5b8c\u6bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7eed\u63a5\u524d\u6587\uff1a \u5378\u8f7d\u65e7\u7684cuda\u5b89\u88c5\u65b0\u7684cuda\u3010CUDA\u964d\u7ea7\u3011 \u8fdb\u5165CUDNN\u7684\u4e0b\u8f7d\u5e93\u4e2d\u9009\u62e9\u4e00\u4e2a\u9002\u5408\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,4,30],"tags":[12,7,31],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-ai","category-linux","category-python","tag-ai","tag-linux","tag-python"],"views":1447,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":4,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":211,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/201\/revisions\/211"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}