Building detectron2 on M1/M2 Macs #4336
Replies: 6 comments 5 replies
-
good to know that |
Beta Was this translation helpful? Give feedback.
-
For step 2,
Before step 4,
Then install
|
Beta Was this translation helpful? Give feedback.
-
Detectron2 error: NotImplementedError: The operator 'aten::_foreach_add.List' is not currently implemented for the MPS device. Is there any way i can utilize my MPS while traning on coustom dataset ? is MMdetection competable with MPS? |
Beta Was this translation helpful? Give feedback.
-
Regarding step 3, I get this: x86_64, does this change step 4? Step 4 is not working for me. |
Beta Was this translation helpful? Give feedback.
-
it works on my Mac M2 chip with macOS14.2.1 Sonoma. That's cool. |
Beta Was this translation helpful? Give feedback.
-
wow, it works in my macOS 15.0 Sequoia. Thanks a tonn. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
With the new pytorch support for Apple Silicon, I was eager to try and run my detectron2 projects on my M1 Mac. I successfully used the following recipe to install detectron2.
Important: The grpcio package is required to successfully build detectron2 from source, but it will not install right out of the box on Apple Silicon. To get circumvent this issue, we need to export the following environmental variables. View source.
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
After that, we are good to go.
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
uname -m
in terminal to check your archflag (should be "arm64")Beta Was this translation helpful? Give feedback.
All reactions