Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CI to separately handle torch >= 1.13 #345

Merged
merged 4 commits into from
Nov 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated build script to handle cuda 10.2 and 11.3 separately.
  • Loading branch information
luisenp committed Nov 3, 2022
commit 9cd8083e64e0cbc2f4db37becb2b77f8ae1d7712
14 changes: 10 additions & 4 deletions build_scripts/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ ROOT_DIR=$1
TAG=$2
CUDA_VERSION=$3

CUDA_VERSION_SUPPORTED=$(echo "cpu 10.2 11.3 11.6" | grep -w ${CUDA_VERSION})
[ "${CUDA_VERSION_SUPPORTED}" ] || die "CUDA_VERSION must be one of (cpu, 10.2, 11.3, 11.6)"
CUDA_VERSION_SUPPORTED=$(echo "cpu 10.2 11.3 11.6 11.7" | grep -w ${CUDA_VERSION})
[ "${CUDA_VERSION_SUPPORTED}" ] || die "CUDA_VERSION must be one of (cpu, 10.2, 11.3, 11.6, 11.7)"


CUDA_SUFFIX=$(echo ${CUDA_VERSION} | sed 's/[.]//g')

TORCH_VERSION='"torch>=1.13"'
if [[ ${CUDA_VERSION} == "cpu" ]]
then
DEVICE_TAG=cpu
Expand All @@ -48,11 +49,16 @@ else

BASPACHO_CUDA_ARCHS="60;70;75"
TORCH_CUDA_ARCH_LIST="6.0;7.0;7.5"
if [[ ${CUDA_VERSION} != '10.2' ]]
if [[ ${CUDA_VERSION} != "10.2" ]]
then
BASPACHO_CUDA_ARCHS="${BASPACHO_CUDA_ARCHS};80"
TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};8.0"
fi
if [[ ${CUDA_VERSION} = "10.2" ]] || [[ ${CUDA_VERSION} = "13.3" ]]
then
TORCH_VERSION='"torch<1.13"'
fi

BASPACHO_CUDA_ARGS="-DCMAKE_CUDA_COMPILER=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc -DBASPACHO_CUDA_ARCHS='${BASPACHO_CUDA_ARCHS}'"
fi

Expand All @@ -73,7 +79,7 @@ for PYTHON_VERSION in 3.9; do

# --- Install torch
ENV CUDA_HOME /usr/local/cuda-${CUDA_VERSION}
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/${DEVICE_TAG}
RUN pip install ${TORCH_VERSION} --extra-index-url https://download.pytorch.org/whl/${DEVICE_TAG}

# --- Install sparse suitesparse
RUN conda install -c conda-forge suitesparse
Expand Down