我的原文:https://www./p/49582.html 本次主要記錄一些自己遇到的問題的解決方案 CUDA、cuDNN大致流程參照 2018 MAC安裝CUDA、cuDNN(Gaming Box1070) 順序是:GPU Driver、CUDA Driver、CUDA Toolkit、cuDNN 安裝驅(qū)動時要注意: MacOS與NVIDIA GPU Driver的版本要匹配,才能驅(qū)動顯卡
CUDA Driver與NVIDIA GPU Driver的版本要一致,CUDA才能找到顯卡 關(guān)鍵地址:
我自己安裝好后的配置是:
版本查看方式:
Pytorch with CUDAPytorch官方 說的很清楚: MacOS Binaries dont support CUDA, install from source if CUDA is needed 目前要 從源碼安裝參照:https://github.com/pytorch/pytorch#from-source 這條路我沒走通。雖然成功編譯了pytorch,但執(zhí)行
按照google結(jié)果,我應(yīng)該在 cp _C.cpython-37m-darwin.so _C.so
cp _dl.cpython-37m-darwin.so _dl.so 但我的 第三方pip包參照:https://github.com/TomHeaven/pytorch-osx-build 我下載的是: 這是別人編譯好的pip包,下載后用pip安裝即可:
No module named ‘torch._C’Library not loaded: @rpath/xxxx.10.0.dylib在運行 Traceback (most recent call last):
File '<stdin>', line 1, in <module>
File '/Users/jerry/anaconda3/lib/python3.7/site-packages/torch/__init__.py', line 84, in <module>
from torch._C import *
ImportError: dlopen(/Users/jerry/anaconda3/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: @rpath/libcufft.10.0.dylib
Referenced from: /Users/jerry/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.dylib
Reason: image not found
參考引用[1] 2018 MAC安裝CUDA、cuDNN(Gaming Box1070), 2019-04-12. |
|