前提・実現したいこと
RTX3090+cuda10.2の環境でPyTorch(torch 1.9.0)を使ったディープラーニングを実装しようとしています。
発生している問題・エラーメッセージ
C:\Users\user-name\anaconda3\envs\torch\lib\site-packages\torch\cuda\__init__.py:106: UserWarning: GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37. If you want to use the GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/ warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))```
該当のソースコード
python
1import torch 2 3print(torch.tensor([0.1, 0.2], device='cpu')) 4# tensor([0.1000, 0.2000]) 5 6print(torch.tensor([0.1, 0.2], device='cuda')) 7# 上記エラーが発生
試したこと
PyTorchがそもそも対応しているかどうかを確認しました。
python
1import torch 2print(torch.cuda.get_arch_list()) 3# ['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'compute_37']
このリストにはRTX3090のsm_86がないことが確認できます。
が,調べていくと,ソースコードを3行程度修正すればパスするとの報告があります。
https://www.gdep.co.jp/information/hot/geforce-rtx3090-3080-3070%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/
ただ,どこをどう修正すればよいか検討がつかず。。。
お詳しい方,ご教示いただけないでしょうか。。。
補足情報(FW/ツールのバージョンなど)
Windows 10 Pro
Intel(R) Core(TM) i9-10980XE CPU @3.00GHz
NVIDIA GeForce RTX 3090
torch: ver1.9.0
その他必要情報がございましたらご連絡ください。

回答1件
あなたの回答
tips
プレビュー