Skip to content

Commit

Permalink
Comment out GPU dependent tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisenp committed Jan 16, 2025
1 parent c299880 commit 94bb82e
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 142 deletions.
130 changes: 65 additions & 65 deletions .github/workflows/test_wheel.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
name: test-wheel
on:
pull_request:
branches:
- main
# name: test-wheel
# on:
# pull_request:
# branches:
# - main

jobs:
test_wheel:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.15]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- uses: actions/[email protected]
- name: Install suitesparse
run: |
sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
- name: Create Conda env
run: |
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
/bin/bash ~/miniconda.sh -b -p ~/conda
export PATH=~/conda/bin:$PATH
conda create --name theseus python=${{ matrix.python-version }}
source activate theseus
pip install --progress-bar off --upgrade pip
pip install --progress-bar off --upgrade setuptools
- name: Install CUDA 11
run: |
# download and install nvidia drivers, cuda, etc
wget --quiet --no-clobber -P ~/nvidia-downloads https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
time sudo /bin/bash ~/nvidia-downloads/cuda_11.7.1_515.65.01_linux.run --no-drm --silent --driver --toolkit
sudo ldconfig /usr/local/cuda/lib64
echo "Done installing NVIDIA drivers and CUDA libraries."
nvidia-smi
- name: Install Torch CUDA 11
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
which python && which pip
pip install --progress-bar off torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
python -c 'import torch; print("Torch version:", torch.__version__); assert torch.cuda.is_available()'
- name: Build CUDA wheel
run: |
echo $(pwd)
echo $(ls)
export PATH=~/conda/bin:$PATH
source activate theseus
which python && which pip
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/_version.py | tail -n 1)
./build_scripts/build_wheel.sh . ${THESEUS_GIT_COMMIT} 11.8 ${THESEUS_VERSION}
pip install $(ls */*.whl)
pip install -r ./requirements/dev.txt
- name: Install theseus from wheel and run tests
run: |
mv theseus theseus_tmp
export PATH=~/conda/bin:$PATH
source activate theseus
which python && which pip
python -m pytest tests/theseus_tests/test_theseus_layer.py
pytest -s tests/theseus_tests/ -m "cudaext"
# jobs:
# test_wheel:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [3.10.15]
# steps:
# - uses: actions/[email protected]
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/[email protected]
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/[email protected]
# - name: Install suitesparse
# run: |
# sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
# - name: Create Conda env
# run: |
# wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
# /bin/bash ~/miniconda.sh -b -p ~/conda
# export PATH=~/conda/bin:$PATH
# conda create --name theseus python=${{ matrix.python-version }}
# source activate theseus
# pip install --progress-bar off --upgrade pip
# pip install --progress-bar off --upgrade setuptools
# - name: Install CUDA 11
# run: |
# # download and install nvidia drivers, cuda, etc
# wget --quiet --no-clobber -P ~/nvidia-downloads https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
# time sudo /bin/bash ~/nvidia-downloads/cuda_11.7.1_515.65.01_linux.run --no-drm --silent --driver --toolkit
# sudo ldconfig /usr/local/cuda/lib64
# echo "Done installing NVIDIA drivers and CUDA libraries."
# nvidia-smi
# - name: Install Torch CUDA 11
# run: |
# export PATH=~/conda/bin:$PATH
# source activate theseus
# which python && which pip
# pip install --progress-bar off torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
# python -c 'import torch; print("Torch version:", torch.__version__); assert torch.cuda.is_available()'
# - name: Build CUDA wheel
# run: |
# echo $(pwd)
# echo $(ls)
# export PATH=~/conda/bin:$PATH
# source activate theseus
# which python && which pip
# 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/_version.py | tail -n 1)
# ./build_scripts/build_wheel.sh . ${THESEUS_GIT_COMMIT} 11.8 ${THESEUS_VERSION}
# pip install $(ls */*.whl)
# pip install -r ./requirements/dev.txt
# - name: Install theseus from wheel and run tests
# run: |
# mv theseus theseus_tmp
# export PATH=~/conda/bin:$PATH
# source activate theseus
# which python && which pip
# python -m pytest tests/theseus_tests/test_theseus_layer.py
# pytest -s tests/theseus_tests/ -m "cudaext"
154 changes: 77 additions & 77 deletions .github/workflows/tests_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
name: gpu-tests
on:
pull_request:
branches:
- main
# name: gpu-tests
# on:
# pull_request:
# branches:
# - main

jobs:
test_with_gpu:
runs-on: 4-core-ubuntu-gpu-t4 # meta configured gpu runner https://www.internalfb.com/intern/opensource/ci/github-actions/runners/
strategy:
matrix:
python-version: [3.10.15]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- uses: actions/[email protected]
- name: Install suitesparse
run: |
sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
- name: Create Conda env
run: |
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
/bin/bash ~/miniconda.sh -b -p ~/conda
export PATH=~/conda/bin:$PATH
conda create --name theseus python=${{ matrix.python-version }}
source activate theseus
pip install --progress-bar off --upgrade pip
pip install --progress-bar off --upgrade setuptools
- name: Install CUDA 11
run: |
# download and install nvidia drivers, cuda, etc
wget --quiet --no-clobber -P ~/nvidia-downloads https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
time sudo /bin/bash ~/nvidia-downloads/cuda_11.7.1_515.65.01_linux.run --no-drm --silent --driver --toolkit
sudo ldconfig /usr/local/cuda/lib64
echo "Done installing NVIDIA drivers and CUDA libraries."
nvidia-smi
- name: Install Torch CUDA 11
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
which python && which pip
pip install --progress-bar off torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
python -c 'import torch; print("Torch version:", torch.__version__); assert torch.cuda.is_available()'
- name: Install recent cmake
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: Build Baspacho GPU
run: |
sudo apt-get install -y libopenblas-pthread-dev
git clone https://github.com/facebookresearch/baspacho.git
cd baspacho
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBLA_STATIC=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBUILD_SHARED_LIBS=OFF -DBASPACHO_CUDA_ARCHS='detect' -DBASPACHO_BUILD_TESTS=OFF -DBASPACHO_BUILD_EXAMPLES=OFF
cmake --build build -- -j16
- name: Install torchlie and torchkin
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
cd torchlie
pip install -e .
cd ../torchkin
pip install -e .
- name: Install theseus
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
echo $(pwd)
BASPACHO_ROOT_DIR=./baspacho pip install -e ".[dev]"
- name: Run Lie groups tests
run: |
export PATH=~/conda/bin:$PATH
source activate theseus
pytest -s tests/theseus_tests/test_theseus_layer.py
pytest -s tests/theseus_tests/ -m "cudaext"
pytest -s tests/theseus_tests/test_pgo_benchmark.py -s
# jobs:
# test_with_gpu:
# runs-on: 4-core-ubuntu-gpu-t4 # meta configured gpu runner https://www.internalfb.com/intern/opensource/ci/github-actions/runners/
# strategy:
# matrix:
# python-version: [3.10.15]
# steps:
# - uses: actions/[email protected]
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/[email protected]
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/[email protected]
# - name: Install suitesparse
# run: |
# sudo apt-get update && sudo apt-get install -y libsuitesparse-dev
# - name: Create Conda env
# run: |
# wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
# /bin/bash ~/miniconda.sh -b -p ~/conda
# export PATH=~/conda/bin:$PATH
# conda create --name theseus python=${{ matrix.python-version }}
# source activate theseus
# pip install --progress-bar off --upgrade pip
# pip install --progress-bar off --upgrade setuptools
# - name: Install CUDA 11
# run: |
# # download and install nvidia drivers, cuda, etc
# wget --quiet --no-clobber -P ~/nvidia-downloads https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
# time sudo /bin/bash ~/nvidia-downloads/cuda_11.7.1_515.65.01_linux.run --no-drm --silent --driver --toolkit
# sudo ldconfig /usr/local/cuda/lib64
# echo "Done installing NVIDIA drivers and CUDA libraries."
# nvidia-smi
# - name: Install Torch CUDA 11
# run: |
# export PATH=~/conda/bin:$PATH
# source activate theseus
# which python && which pip
# pip install --progress-bar off torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
# python -c 'import torch; print("Torch version:", torch.__version__); assert torch.cuda.is_available()'
# - name: Install recent cmake
# run: |
# sudo apt-get update
# sudo apt-get install -y cmake
# - name: Build Baspacho GPU
# run: |
# sudo apt-get install -y libopenblas-pthread-dev
# git clone https://github.com/facebookresearch/baspacho.git
# cd baspacho
# cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBLA_STATIC=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DBUILD_SHARED_LIBS=OFF -DBASPACHO_CUDA_ARCHS='detect' -DBASPACHO_BUILD_TESTS=OFF -DBASPACHO_BUILD_EXAMPLES=OFF
# cmake --build build -- -j16
# - name: Install torchlie and torchkin
# run: |
# export PATH=~/conda/bin:$PATH
# source activate theseus
# cd torchlie
# pip install -e .
# cd ../torchkin
# pip install -e .
# - name: Install theseus
# run: |
# export PATH=~/conda/bin:$PATH
# source activate theseus
# echo $(pwd)
# BASPACHO_ROOT_DIR=./baspacho pip install -e ".[dev]"
# - name: Run Lie groups tests
# run: |
# export PATH=~/conda/bin:$PATH
# source activate theseus
# pytest -s tests/theseus_tests/test_theseus_layer.py
# pytest -s tests/theseus_tests/ -m "cudaext"
# pytest -s tests/theseus_tests/test_pgo_benchmark.py -s

0 comments on commit 94bb82e

Please sign in to comment.