Skip to content

Commit

Permalink
ci: simplify gpu backend install.
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Jan 8, 2024
1 parent 7c083bb commit 677055a
Showing 1 changed file with 6 additions and 38 deletions.
44 changes: 6 additions & 38 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,49 +107,17 @@ jobs:
source $RUNNER_WORKSPACE/venv/bin/activate
pip install --upgrade pip wheel
pip install -e mri-nufft[test]
pip install finufft
- name: Install Experimental cufinufft
if: ${{ matrix.backend == 'cufinufft' }}
shell: bash
run: |
cd $RUNNER_WORKSPACE
rm -rf finufft
git clone https://github.com/flatironinstitute/finufft
cd finufft && mkdir build && cd build
export PATH=/usr/local/cuda-11.8/bin:$PATH
export CUDA_PATH=/usr/local/cuda-11.8
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
export CUDA_BIN_PATH=/usr/local/cuda-11.8
cmake -DFINUFFT_USE_CUDA=1 ../ && cmake --build . && cp libcufinufft.so ../python/cufinufft/.
# enter venv
source $RUNNER_WORKSPACE/venv/bin/activate
pip install cupy-cuda11x
cd $RUNNER_WORKSPACE/finufft/python/cufinufft
python setup.py develop
# FIXME: This is hardcoded
cp libcufinufft.so cufinufftc.cpython-310-x86_64-linux-gnu.so
cd $RUNNER_WORKSPACE
pip install finufft
- name: Install gpuNUFFT
if: ${{ matrix.backend == 'gpunufft' }}
- name: Install backend
shell: bash
run: |
cd $RUNNER_WORKSPACE
rm -rf gpuNUFFT
git clone https://github.com/chaithyagr/gpuNUFFT
cd gpuNUFFT
export PATH=/usr/local/cuda-11.8/bin:$PATH
export CUDA_PATH=/usr/local/cuda-11.8
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
export CUDA_BIN_PATH=/usr/local/cuda-11.8
source $RUNNER_WORKSPACE/venv/bin/activate
python setup.py install
pip install cupy-cuda11x
export CUDA_BIN_PATH=/usr/local/cuda11.8/
export PATH=/usr/local/cuda11.8/bin/${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda11.8/lib/{LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
pip install ${{ matrix.backend }}
- name: Run Tests
shell: bash
Expand Down

0 comments on commit 677055a

Please sign in to comment.