Unverified Commit 6d9c04d8 authored by moto's avatar moto Committed by GitHub
Browse files

Temporarily pin nightly version on Linux/macOS CPU unittest (#1598)

There are some issues on CMake-based integration after 2021-06-19.

```
  Imported target "torch" includes non-existent path
    "/opt/conda/conda-bld/pytorch_1624259172741/work/torch/lib"
  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
  * The path was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and references files it does not provide.
```

This is being worked on PR like https://github.com/pytorch/pytorch/pull/60403.
The nightly builds are still causing the error, so as a workaround, 
we pin the nightly build version for Linux/macOS unittest.
The issue still happens on Windows unittest and binary builds.
parent 380800ce
...@@ -23,21 +23,41 @@ eval "$("${conda_dir}/bin/conda" shell.bash hook)" ...@@ -23,21 +23,41 @@ eval "$("${conda_dir}/bin/conda" shell.bash hook)"
conda activate "${env_dir}" conda activate "${env_dir}"
# 1. Install PyTorch # 1. Install PyTorch
if [ -z "${CUDA_VERSION:-}" ] ; then # [2021/06/22 Temporary workaround] Disabling the original installation
if [ "${os}" == MacOSX ] ; then # The orignal, conda-based instartion is working for GPUs, but not for CPUs
cudatoolkit='' # For CPUs we use pip-based installation
else # if [ -z "${CUDA_VERSION:-}" ] ; then
cudatoolkit="cpuonly" # if [ "${os}" == MacOSX ] ; then
fi # cudatoolkit=''
# else
# cudatoolkit="cpuonly"
# fi
# else
# version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
# cudatoolkit="cudatoolkit=${version}"
# fi
# printf "Installing PyTorch with %s\n" "${cudatoolkit}"
# (
# set -x
# conda install ${CONDA_CHANNEL_FLAGS:-} -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit}
# )
if [ "${os}" == MacOSX ] || [ -z "${CUDA_VERSION:-}" ] ; then
device="cpu"
printf "Installing PyTorch with %s\n" "$device}"
(
set -x
pip install --pre torch==1.10.0.dev20210618 -f "https://download.pytorch.org/whl/nightly/${device}/torch_nightly.html"
)
else else
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cudatoolkit="cudatoolkit=${version}" cudatoolkit="cudatoolkit=${version}"
fi printf "Installing PyTorch with %s\n" "${cudatoolkit}"
printf "Installing PyTorch with %s\n" "${cudatoolkit}" (
(
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}" "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit}
) )
fi
# 2. Install torchaudio # 2. Install torchaudio
printf "* Installing torchaudio\n" printf "* Installing torchaudio\n"
......
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