{"provider_name":"Hatena Blog","published":"2024-07-12 18:56:03","height":"190","url":"https://fallpoke-tech.hatenadiary.jp/entry/2024/07/12/185603","title":"Pytorch\u306e\u30a8\u30e9\u30fc\u300cPyTorch: RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED\u300d","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/fallpoke/","blog_title":"\u8ab0\u304b\u306e\u6280\u8853\u7f6e\u304d\u5834","blog_url":"https://fallpoke-tech.hatenadiary.jp/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffallpoke-tech.hatenadiary.jp%2Fentry%2F2024%2F07%2F12%2F185603\" title=\"Pytorch\u306e\u30a8\u30e9\u30fc\u300cPyTorch: RuntimeError: device &gt;= 0 &amp;&amp; device &lt; num_gpus INTERNAL ASSERT FAILED\u300d - \u8ab0\u304b\u306e\u6280\u8853\u7f6e\u304d\u5834\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Python","\u5099\u5fd8\u9332","Pytorch"],"type":"rich","description":"\u304a\u75b2\u308c\u69d8\u3067\u3059\u3002 Pytorch\u4f7f\u7528\u6642\u306b\u767a\u751f\u3057\u305f\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u306b\u3064\u3044\u3066\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002 \u57fa\u672c\u7684\u306b\u306f\u8abf\u3079\u305f\u30b5\u30a4\u30c8\u3084\u8a18\u4e8b\u3092\u307e\u3068\u3081\u305f\u3060\u3051\u306b\u306a\u308a\u307e\u3059\u3002 \u30a8\u30e9\u30fc\u6587 PyTorch: RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED \u516c\u5f0fGitHub\u306eissue\u3067\u3082\u8b70\u8ad6\u3055\u308c\u3066\u3044\u308b\u5185\u5bb9\u3067\u3059\u306d\u3002 github.com github.com \u5bfe\u51e6\u65b9\u6cd5 1\uff0e \u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3059\u308b\u3002 import os os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\" os.environ[\"WORLD_SIZE\"\u2026","width":"100%","author_name":"fallpoke","image_url":"https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png"}