{"id":2509,"date":"2020-08-03T10:58:41","date_gmt":"2020-08-03T01:58:41","guid":{"rendered":"http:\/\/43.203.250.216\/?p=2509"},"modified":"2020-12-30T12:02:37","modified_gmt":"2020-12-30T03:02:37","slug":"tensorflow%ec%97%90%ec%84%9c-cublas_status_not_initialized-%ec%98%a4%eb%a5%98-%eb%ac%b8%ec%a0%9c","status":"publish","type":"post","link":"https:\/\/litcoder.com\/?p=2509","title":{"rendered":"TensorFlow\uc5d0\uc11c CUBLAS_STATUS_NOT_INITIALIZED \uc624\ub958 \ubb38\uc81c"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774 \ubb38\uc81c\ub294 TensorFlow\uc758 GPU memory growth \uc124\uc815\uacfc \uad00\ub828\uc774 \uc788\ub2e4. \uc774 \uacbd\uc6b0 GPU\uc758 allow_grouth option\uc744 True\ub85c \uc124\uc815\ud558\uba74 \ubb38\uc81c\ub97c \ud574\uacb0\ud560 \uc218 \uc788\ub294\ub370, <a href=\"https:\/\/www.tensorflow.org\/guide\/gpu\">Use a GPU<\/a> \ud398\uc774\uc9c0\uc5d0 \ub530\ub974\uba74 tf.config.experimental.set_memory_growth()\ub97c \ud1b5\ud574 True\ub85c \uc124\uc815\ud558\uac70\ub098 \ud639\uc740 \ud658\uacbd\ubcc0\uc218 TF_FORCE_GPU_ALLOW_GROWTH\ub97c \uc124\uc815\ud574\uc11c \ud574\uacb0 \ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ucf54\ub4dc\uc5d0 \ub2e4\uc74c\uacfc \uac19\uc774 \ud658\uacbd \ubcc0\uc218\ub97c \uc124\uc815\ud574 \uc904 \uc218\ub3c4 \uc788\uc9c0\ub9cc,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Fix CUBLAS_STATUS_NOT_INITIALIZED error.\n#  - failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED\nos.environ [ \"TF_FORCE_GPU_ALLOW_GROWTH\" ] = \"true\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc2e4\ud589 \ud658\uacbd\uc5d0 \ub530\ub77c \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud558\uc9c0 \uc54a\uc744 \uc218\ub3c4 \uc788\uc5b4\uc11c, \ub098\ub294 \uc8fc\ub85c command line\uc5d0\uc11c \ub2e4\uc74c\uacfc \uac19\uc774 script\ub97c \uc2e4\ud589\ud560 \ub54c \uc774 \uac12\uc744 \ud568\uaed8 \uc124\uc815\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Command terminal\nTF_FORCE_CPU_ALLOW_GROWTH=true flask run --host=0.0.0.9 <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED \uc774 \ubb38\uc81c\ub294 TensorFlow\uc758 GPU memory growth \uc124\uc815\uacfc \uad00\ub828\uc774 \uc788\ub2e4. \uc774 \uacbd\uc6b0 GPU\uc758 allow_grouth option\uc744 True\ub85c \uc124\uc815\ud558\uba74 \ubb38\uc81c\ub97c \ud574\uacb0\ud560 \uc218 \uc788\ub294\ub370, Use a GPU \ud398\uc774\uc9c0\uc5d0 \ub530\ub974\uba74 tf.config.experimental.set_memory_growth()\ub97c \ud1b5\ud574 True\ub85c \uc124\uc815\ud558\uac70\ub098 \ud639\uc740 \ud658\uacbd\ubcc0\uc218 TF_FORCE_GPU_ALLOW_GROWTH\ub97c \uc124\uc815\ud574\uc11c \ud574\uacb0 \ud560 \uc218 \uc788\ub2e4. \ucf54\ub4dc\uc5d0 \ub2e4\uc74c\uacfc \uac19\uc774 \ud658\uacbd \ubcc0\uc218\ub97c \uc124\uc815\ud574 \uc904 \uc218\ub3c4 \uc788\uc9c0\ub9cc, \uc2e4\ud589 \ud658\uacbd\uc5d0 \ub530\ub77c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[231,230,228,229],"class_list":["post-2509","post","type-post","status-publish","format-standard","hentry","category-programming","tag-cublas","tag-cuda","tag-tensorflow","tag-tf"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/2509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2509"}],"version-history":[{"count":17,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/2509\/revisions"}],"predecessor-version":[{"id":2705,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/2509\/revisions\/2705"}],"wp:attachment":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}