[ARM-based Apple] Proper instruction for Mac M1/M2
As you may know that CUDA is got going to support Apple ARM-based chipset. Is there anyway to get around and run this project on Mac M1/M2?
I'm go through a lot of issues in this repo and still cannot get my M1 Pro to work.
My Error
│ /opt/anaconda3/envs/visgpt/lib/python3.8/site-packages/torch/cuda/__init__.py:211 │
│ in _lazy_init │
│ │
│ 208 │ │ │ │ "Cannot re-initialize CUDA in forked subprocess. To use CUDA with " │
│ 209 │ │ │ │ "multiprocessing, you must use the 'spawn' start method") │
│ 210 │ │ if not hasattr(torch._C, '_cuda_getDeviceCount'): │
│ ❱ 211 │ │ │ raise AssertionError("Torch not compiled with CUDA enabled") │
│ 212 │ │ if _cudart is None: │
│ 213 │ │ │ raise AssertionError( │
│ 214 │ │ │ │ "libcudart functions unavailable. It looks like you have a broken build? │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError: Torch not compiled with CUDA enabled
#37
You can do it but must modify code on 4-5 files to replace cuda with cpu. In this case is file init.py And after torch import put this import torch
torch.backends.cudnn.enabled = False It works fine on my mac pro 2019 just a bit slower but only for image processing
现在自带的requirements.txt,是可以帮助我用cpu运转的,但是太慢了。 我尝试过看#37的问题,但是因为修改requirements,会卡在pip install -r requirements.txt 这一步,尝试很多次都不行。
你能基于最新的requirements.txt,告诉我接下来需要怎么做吗?(我现在找不到需要编辑的文件在哪,
