Unverified Commit 70bb4920 authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Pin MKL to 2021.2.0 (#1655)

* Pin MKL to 2021.2.0

Fixes https://github.com/pytorch/pytorch/issues/62424

* Apply the same  constraint for conda builds

Use less-than-equals constraint to avoid dependency conflicts for
python-3.6 environment
parent af8d3b97
...@@ -35,8 +35,15 @@ else ...@@ -35,8 +35,15 @@ else
fi fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}" printf "Installing PyTorch with %s\n" "${cudatoolkit}"
( (
if [ "${os}" == MacOSX ] ; then
# TODO: this can be removed as soon as linking issue could be resolved
# see https://github.com/pytorch/pytorch/issues/62424 from details
MKL_CONSTRAINT='mkl==2021.2.0'
else
MKL_CONSTRAINT=''
fi
set -x set -x
conda install ${CONDA_CHANNEL_FLAGS:-} -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit} conda install ${CONDA_CHANNEL_FLAGS:-} -y -c "pytorch-${UPLOAD_CHANNEL}" $MKL_CONSTRAINT "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit}
) )
# 2. Install torchaudio # 2. Install torchaudio
......
...@@ -238,6 +238,11 @@ setup_conda_pytorch_constraint() { ...@@ -238,6 +238,11 @@ setup_conda_pytorch_constraint() {
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}" export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}"
export CONDA_PYTORCH_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}" export CONDA_PYTORCH_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}"
fi fi
# TODO: Remove me later, see https://github.com/pytorch/pytorch/issues/62424 for more details
if [[ "$(uname)" == Darwin ]]; then
# Use less than equal to avoid version conflict in python=3.6 environment
export CONDA_EXTRA_BUILD_CONSTRAINT="- mkl<=2021.2.0"
fi
} }
# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT # Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT
......
...@@ -17,12 +17,13 @@ requirements: ...@@ -17,12 +17,13 @@ requirements:
- cmake - cmake
- ninja - ninja
- defaults::numpy >=1.11 - defaults::numpy >=1.11
{{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }}
{{ environ.get('CONDA_EXTRA_BUILD_CONSTRAINT', '') }}
run: run:
- python - python
- defaults::numpy >=1.11 - defaults::numpy >=1.11
{{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} {{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }}
build: build:
string: py{{py}} string: py{{py}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment