{"id":1171,"date":"2023-03-12T14:07:52","date_gmt":"2023-03-12T05:07:52","guid":{"rendered":"https:\/\/rfsec.ddns.net\/db\/?p=1171"},"modified":"2023-04-09T08:35:01","modified_gmt":"2023-04-08T23:35:01","slug":"cuda%e5%af%be%e5%bf%9c%e3%81%aetorch%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/rfsec.ddns.net\/db\/?p=1171","title":{"rendered":"cuda\u5bfe\u5fdc\u306etorch\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/minisoba.com\/entry\/2022\/06\/05\/213858\">ubuntu22.04\u3078\u975e\u63a8\u5968\u306ecuda11.6\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ sudo apt install --no-install-recommends nvidia-driver-510\n$ sudo apt install nvidia-prime\n$ sudo apt install nvidia-cuda-toolkit<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/stackoverflow.com\/questions\/70340812\/how-to-install-pytorch-with-cuda-support-with-pip-in-visual-studio\">https:\/\/stackoverflow.com\/questions\/70340812\/how-to-install-pytorch-with-cuda-support-with-pip-in-visual-studio<\/a><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python\nPython 3.9.13 (tags\/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32\nType &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.\n&gt;&gt;&gt; import torch\n&gt;&gt;&gt; print(torch.__version__)\n1.13.1+cpu\n\n---------------------------\n&gt; nvidia-smi\nSat Mar 11 11:43:37 2023\n+-----------------------------------------------------------------------------+\n| NVIDIA-SMI 510.06       Driver Version: 510.06       CUDA Version: 11.6     |\n|-------------------------------+----------------------+----------------------+\n\n\npip3 install torch==1.13.1+cu116  -f https:\/\/download.pytorch.org\/whl\/cu116\/torch_stable.html\n\n&gt; pip3 install torch==1.13.1+cu116  -f https:\/\/download.pytorch.org\/whl\/cu116\/torch_stable.html\nLooking in links: https:\/\/download.pytorch.org\/whl\/cu116\/torch_stable.html\nCollecting torch==1.13.1+cu116\n  Downloading https:\/\/download.pytorch.org\/whl\/cu116\/torch-1.13.1%2Bcu116-cp39-cp39-win_amd64.whl (2434.0 MB)\n     \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 2.4\/2.4 GB 562.9 kB\/s eta 0:00:00\nRequirement already satisfied: typing-extensions in c:\\users\\ei2k-\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\\localcache\\local-packages\\python39\\site-packages (from torch==1.13.1+cu116) (4.0.1)\nInstalling collected packages: torch\n  Attempting uninstall: torch\n    Found existing installation: torch 1.13.1\n    Uninstalling torch-1.13.1:\n      Successfully uninstalled torch-1.13.1\nSuccessfully installed torch-1.13.1+cu116\nPS C:\\Users\\ei2k-&gt; python\nPython 3.9.13 (tags\/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32\nType &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.\n&gt;&gt;&gt; import torch\n&gt;&gt;&gt; print(torch.__version__)\n1.13.1+cu116\n&gt;&gt;&gt;<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu22.04\u3078\u975e\u63a8\u5968\u306ecuda11.6\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb https:\/\/stackoverflow.com\/questions\/70340812\/how-to-install-pytorch-with-cuda- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1171","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"featured_image_src":null,"author_info":{"display_name":"mars","author_link":"https:\/\/rfsec.ddns.net\/db\/?author=1"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1171"}],"version-history":[{"count":3,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1171\/revisions"}],"predecessor-version":[{"id":1191,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1171\/revisions\/1191"}],"wp:attachment":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}