From 50a6e91f972158529a7c9f06c4c6fd4510196e32 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Mon, 2 Oct 2023 21:02:59 -0700 Subject: [PATCH] Towards enabling M1 wheel builds Do not try to install MKL on Apple Silicon --- wheel/build_wheel.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wheel/build_wheel.sh b/wheel/build_wheel.sh index 99d251977..a45522bf8 100755 --- a/wheel/build_wheel.sh +++ b/wheel/build_wheel.sh @@ -168,7 +168,11 @@ if [[ "$desired_python" == "3.11" ]]; then else retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}" nomkl "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests fi -retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja mkl-include==2022.2.1 mkl-static==2022.2.1 -c intel +if [[ "$(uname -m)" == "arm64" ]]; then + retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja +else + retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja mkl-include==2022.2.1 mkl-static==2022.2.1 -c intel +fi retry pip install -qr "${pytorch_rootdir}/requirements.txt" || true # For USE_DISTRIBUTED=1 on macOS, need libuv and pkg-config to find libuv.