Doing builds on m1 macs

Does anyone have a guide for this? I need to do a rebuild of pytorch and libtorch to use the la pack for a model I’m trying to move to mobile. Does anyone have any guides or experience that would help me with this?

cc @xta0 - do you have some pointers how to make this work?

@Matt_Davis so far I don’t have experience in building PyTorch on M1 Mac. I did some web search and find some folks successfully built it on M1.

Hi Matt,

What I run is:
OPENSSL_ROOT_DIR="/opt/homebrew/opt/openssl/" BLAS=“Generic” MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

Possible BLAS option: “Generic” (which uses cblas), “OpenBLAS”, “vecLib”

You may need to add other env variables depending on what you have in your env - generally a sane homebrew python install should get you there eventually