{"id":454,"date":"2018-03-20T13:04:42","date_gmt":"2018-03-20T05:04:42","guid":{"rendered":"http:\/\/www.tastestars.com\/?p=454"},"modified":"2018-03-20T13:04:42","modified_gmt":"2018-03-20T05:04:42","slug":"%e5%85%b3%e4%ba%8ecuda-runtime-error-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%9a","status":"publish","type":"post","link":"https:\/\/tastestars.com\/index.php\/2018\/03\/20\/%e5%85%b3%e4%ba%8ecuda-runtime-error-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%9a\/","title":{"rendered":"\u5173\u4e8ecuda runtime error \u7684\u89e3\u51b3\u65b9\u6848\uff1a"},"content":{"rendered":"<p>\u81ea\u5df1\u5199\u7684\u7a0b\u5e8f\u9047\u5230\u4e86\u5982\u4e0b\u9519\u8bef\uff1a<br \/>\n\u201cRuntimeError: cuda runtime error (2) : out of memory at d:\\downloads\\pytorch-master-1\\torch\\lib\\thc\\generic\/THCStorage.cu:66\u201d<\/p>\n<p>cuda\u6709\u4e00\u5b9a\u7684\u8fd0\u884c\u65f6\u95f4\u9650\u5236\uff0c\u8d85\u8fc7\u4e00\u5b9a\u7684\u65f6\u95f4\u5c31\u8ba4\u4e3a\u8d85\u65f6\u62a5\u9519\u3002<br \/>\n\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<ol>\n<li>\u589e\u52a0cuda\u7684\u8d85\u65f6\u65f6\u95f4\u3002\n<ol>\n<li>\u6253\u5f00\u6ce8\u518c\u8868 cmd->regedit<\/li>\n<li>\u6253\u5f00 \u8ba1\u7b97\u673a\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers<\/li>\n<li>\u589e\u52a0\u4e24\u4e2a\u9879\u76ee \u53f3\u952e->\u65b0\u5efa->DWORD(32\u4f4d)<br \/>\n\u540d\u79f0\uff1aTdrDelay \u7c7b\u578b\uff1aREG_DWORD \u6570\u636e 0x00000040(64)<br \/>\n\u540d\u79f0\uff1aTdrLevel \u7c7b\u578b\uff1aREG_DWORD \u6570\u636e 0x00000006(6)<\/li>\n<li>\u91cd\u542f\u8ba1\u7b97\u673a\u5c31ok\u5566<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"455\" data-permalink=\"https:\/\/tastestars.com\/index.php\/2018\/03\/20\/%e5%85%b3%e4%ba%8ecuda-runtime-error-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%9a\/%e6%8d%95%e8%8e%b7-5\/\" data-orig-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2018\/03\/\u6355\u83b7.png\" data-orig-size=\"713,372\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\u6355\u83b7\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2018\/03\/\u6355\u83b7.png\" data-large-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2018\/03\/\u6355\u83b7.png\" src=\"http:\/\/www.tastestars.com\/wp-content\/uploads\/2018\/03\/\u6355\u83b7.png\" alt=\"\" width=\"713\" height=\"372\" class=\"alignnone size-full wp-image-455\" \/><\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u51cf\u5c11load\u6570\u636e\u7684\u65f6\u95f4\u3002<br \/>\n\u53ef\u80fdload\u7684\u65f6\u95f4\u4e5f\u88ab\u7b97\u8fdb\u53bb\u4e86\uff0c\u6211\u7684\u6570\u636e\u5f88\u5927\u7684\u65f6\u5019Memory\u663e\u793a100%\uff0c\u5361\u4f4f\u4e86.<br \/>\n\u4e8e\u662f\u63d0\u524d\u5199\u4e00\u4e2a\u6570\u636e\u5904\u7406\u811a\u672c\uff0c\u63d0\u524d\u5c06\u6570\u636e\u5199\u5165csv,\u8981\u7528\u7684\u65f6\u5019\u76f4\u63a5\u62ff\u53d6\u5c31\u597d\u4e86\u3002<\/p>\n<\/li>\n<li>\n<p>\u51cf\u5c11\u6570\u636e\/\u51cf\u5c11\u8ba1\u7b97\u91cf<br \/>\n\u53ef\u4ee5\u63a8\u7b97\u4e00\u4e0b\u7f51\u7edc\u9700\u8981\u7684\u53c2\u6570\u4e2a\u6570\uff0c\u6bcf\u4e2a\u53604Bytes.<br \/>\n\u9700\u8981\u5b58\u50a8\u7684\u53c2\u6570\u4e2a\u6570*4Byte\/(1024^3)<br \/>\n\u7b97\u51fa\u6765\u5c31\u662f\u4f60\u9700\u8981\u591a\u5c11G\u7684\u5b58\u50a8\u7a7a\u95f4\u4e86\u3002<br \/>\n\u67e5\u770b\u4e00\u4e0b\u4f60\u7684GPU\u53ef\u4ee5\u5bb9\u7eb3\u591a\u5c11\u7a7a\u95f4\uff0c\u770b\u770b\u662f\u4e0d\u662f\u771f\u7684\u8d85\u4e86\u3002\u8d85\u4e86\u7684\u8bdd\u53ea\u597d\u51cf\u5c11\u6570\u636e\/\u7b80\u5316\u7f51\u7edc\u7ed3\u6784\u4ece\u800c\u51cf\u5c11\u8ba1\u7b97\u91cf\u4e86\u3002<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5df1\u5199\u7684\u7a0b\u5e8f\u9047\u5230\u4e86\u5982\u4e0b\u9519\u8bef\uff1a \u201cRuntimeError: cuda runtime error (2) :  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10],"tags":[84,85,86],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-solvetheproblem","tag-cuda","tag-gpu","tag-memory"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9Hs6X-7k","_links":{"self":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":2,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":457,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/454\/revisions\/457"}],"wp:attachment":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}