diff --git a/packaging/build_cmake.sh b/packaging/build_cmake.sh index 0945f576ee2..73fb8694db0 100755 --- a/packaging/build_cmake.sh +++ b/packaging/build_cmake.sh @@ -28,7 +28,15 @@ fi setup_visual_studio_constraint setup_junit_results_folder -conda install -yq pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE -c "pytorch-${UPLOAD_CHANNEL}" +if [[ "$(uname)" == Darwin ]]; then + # TODO: this can be removed as soon as mkl's CMake support works with clang + # see https://github.com/pytorch/vision/pull/4203 for details + MKL_CONSTRAINT='mkl==2021.2.0' +else + MKL_CONSTRAINT='' +fi + +conda install -yq \pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE $MKL_CONSTRAINT -c "pytorch-${UPLOAD_CHANNEL}" TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)")) if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then