Skip to content

Commit db08dce

Browse files
malfetpmeierfmassa
authored
fix MacOS cmake workflow (#4203) (#4400)
* fix MacOS cmake workflow * try only mkl * only pin mkl on MacOs * fix Co-authored-by: Francisco Massa <[email protected]> Co-authored-by: Philip Meier <[email protected]> Co-authored-by: Francisco Massa <[email protected]>
1 parent 6e72416 commit db08dce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packaging/build_cmake.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ fi
2828
setup_visual_studio_constraint
2929
setup_junit_results_folder
3030

31-
conda install -yq pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE -c "pytorch-${UPLOAD_CHANNEL}"
31+
if [[ "$(uname)" == Darwin ]]; then
32+
# TODO: this can be removed as soon as mkl's CMake support works with clang
33+
# see https://github.com/pytorch/vision/pull/4203 for details
34+
MKL_CONSTRAINT='mkl==2021.2.0'
35+
else
36+
MKL_CONSTRAINT=''
37+
fi
38+
39+
conda install -yq \pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE $MKL_CONSTRAINT -c "pytorch-${UPLOAD_CHANNEL}"
3240
TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)"))
3341

3442
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then

0 commit comments

Comments
 (0)