Building detectron2 on M1/M2 Macs #4336
Replies: 9 comments 10 replies
|
good to know that |
|
For step 2,
Before step 4,
Then install
|
|
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? |
|
Regarding step 3, I get this: x86_64, does this change step 4? Step 4 is not working for me. |
|
it works on my Mac M2 chip with macOS14.2.1 Sonoma. That's cool. |
|
wow, it works in my macOS 15.0 Sequoia. Thanks a tonn. |
|
I failed to install it in pyenv using python3.10. |
|
I got it compiling with the following on an M2 The specific include directory may be different for you based on the version of CommandLineTools you so check that before trying yourself. |
|
This is a workable solution for me: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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=1export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1After that, we are good to go.
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpuuname -min terminal to check your archflag (should be "arm64")All reactions