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

Add tests for wheels in CI #354

Merged
merged 6 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
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
Removed CUDA 10.2 wheel job from CI.
  • Loading branch information
luisenp committed Nov 8, 2022
commit fc2f665b255d6280d4e2acafe6ba2249d72bf7c8
25 changes: 1 addition & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ update_and_install_python: &update_and_install_python
command: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3.7 python3.7-dev python3.8 python3.8-dev python3.9 python3.9-dev
sudo apt-get install -y python3.9 python3.9-dev
install_nox: &install_nox
- run:
Expand Down Expand Up @@ -176,17 +176,6 @@ run_tests: &run_tests
pytest -s tests/test_theseus_layer.py
pytest -s tests -m "cudaext"
build_cuda10_wheel: &build_cuda10_wheel
- run:
name: Building wheel for CUDA 10
working_directory: /home/circleci
command: |
THESEUS_GIT_COMMIT=$(git --git-dir project/.git log --format="%H" -n 1)
THESEUS_VERSION=$(grep -Eo "[0-9].[0-9].[0-9][.0-9a-z]*" project/theseus/__init__.py)
./project/build_scripts/build_wheel.sh . ${THESEUS_GIT_COMMIT} 10.2 ${THESEUS_VERSION}
pip install $(ls */*.whl)
pip install -r project/requirements/dev.txt
build_cuda11_wheel: &build_cuda11_wheel
- run:
name: Building wheel for CUDA 11
Expand Down Expand Up @@ -290,17 +279,6 @@ jobs:
- <<: *setup_project
- <<: *run_tests

test_cuda10_wheel:
executor: gpu_cuda10
steps:
- checkout
- <<: *update_and_install_python
- <<: *install_suitesparse
- <<: *setup_cuda11_libs
- <<: *setup_environment
- <<: *build_cuda10_wheel
- <<: *run_tests_from_wheel

test_cuda11_wheel:
executor: gpu_cuda11
steps:
Expand All @@ -323,5 +301,4 @@ workflows:
- py39_linux
- unittests_gpu17_cuda10
- unittests_gpu17_cuda11
- test_cuda10_wheel
- test_cuda11_wheel
31 changes: 15 additions & 16 deletions build_scripts/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,6 @@ for PYTHON_VERSION in 3.9; do
echo """# ----------------
FROM ${IMAGE_NAME}
# --- Install conda and environment
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
ENV PATH \$CONDA_DIR/bin:\$PATH
RUN conda create --name theseus python=${PYTHON_VERSION}
RUN source activate theseus
# --- Install torch
ENV CUDA_HOME /usr/local/cuda-${CUDA_VERSION}
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
# --- Install baspacho dependencies (cmake, BLAS)
RUN wget --quiet https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh -O ~/cmake3.24.sh
RUN mkdir /opt/cmake3.24
Expand All @@ -101,7 +86,6 @@ for PYTHON_VERSION in 3.9; do
# --- Install baspacho
RUN git clone https://github.com/facebookresearch/baspacho.git
WORKDIR baspacho
# Note: to use static BLAS the option is really BLA_STATIC (https://cmake.org/cmake/help/latest/module/FindBLAS.html)
RUN /opt/cmake3.24/bin/cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBLA_STATIC=ON \
${BASPACHO_CUDA_ARGS} \
Expand All @@ -110,6 +94,21 @@ for PYTHON_VERSION in 3.9; do
RUN /opt/cmake3.24/bin/cmake --build build -- -j16
WORKDIR ..
# --- Install conda and environment
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
ENV PATH \$CONDA_DIR/bin:\$PATH
RUN conda create --name theseus python=${PYTHON_VERSION}
RUN source activate theseus
# --- Install torch
ENV CUDA_HOME /usr/local/cuda-${CUDA_VERSION}
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
# --- Compile theseus wheel
RUN pip install build wheel
RUN git clone https://github.com/facebookresearch/theseus.git
Expand Down