Skip to content

Commit

Permalink
Remove the mismatched version warning (#97)
Browse files Browse the repository at this point in the history
* Remove the mismatched version warning

* Add setuptools to requirements

* Two attempts at nvcc CI

* Two fix attempts

* Try newer cuda version

* Replace hardcoded CUDA path in Makefile

* Unpin cuda in environment.yaml

* Remove CUDA_HOME export in workflow

* Still seem to need explicit CUDA_HOME in with 12.6

Goes in azure config which is better at least
  • Loading branch information
johnlees authored Jan 6, 2025
1 parent 336c0d6 commit cfa6a49
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

name: Run tests
name: Run tests (CPU)

on: [push]

Expand Down
14 changes: 6 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trigger:
- master

pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'
strategy:
matrix:
Python38:
Expand All @@ -24,12 +24,10 @@ steps:
displayName: Add conda to PATH

- script: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda=11.2.2-1
sudo apt-get -y install cuda-toolkit
displayName: Install nvcc

- bash: conda env create --file environment.yml
Expand All @@ -39,7 +37,7 @@ steps:
# pushd src && make && make install && popd
- script: |
source activate pp_env
export CUDA_HOME=/usr/local/cuda-11.2
export CUDA_HOME=/usr/local/cuda-12.6
export PATH=${CUDA_HOME}/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export SKETCHLIB_INSTALL=azure
Expand All @@ -48,7 +46,7 @@ steps:

- script: |
source activate pp_env
export CUDA_HOME=/usr/local/cuda-11.2
export CUDA_HOME=/usr/local/cuda-12.6
export PATH=${CUDA_HOME}/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
cd test && python run_test.py
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ channels:
dependencies:
- python
- pip
- setuptools
- numpy
- scipy
- docopt
Expand All @@ -21,4 +22,4 @@ dependencies:
- openblas
- libgfortran-ng
- nvcc_linux-64
- cudatoolkit==11.2 # This is pinned due to version install on azure, see azure-pipelines.yml
- cudatoolkit # This is pinned due to version install on azure, see azure-pipelines.yml
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ numpy
pybind11
scipy
docopt
setuptools
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CUDAFLAGS +=-std=c++17 -Xcompiler -fPIC --cudart static --relocatable-device-cod
ifdef GPU
CXXFLAGS += -DGPU_AVAILABLE
CUDAFLAGS += -gencode arch=compute_86,code=sm_86
CUDA_LDFLAGS += -L/usr/local/cuda-11.2/lib64
CUDA_LDFLAGS += -L${CUDA_HOME}/lib64
endif

PYTHON_LIB = pp_sketchlib$(shell python3-config --extension-suffix)
Expand Down
5 changes: 0 additions & 5 deletions src/sketchlib_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ NumpyMatrix queryDatabase(const std::string &ref_db_name,
throw std::runtime_error(
"Extracting Jaccard distances not supported on GPU");
}
if (!same_db_version(ref_db_name, query_db_name)) {
std::cerr << "WARNING: versions of input databases sketches are different,"
" results may not be compatible"
<< std::endl;
}

std::vector<Reference> ref_sketches =
load_sketches(ref_db_name, ref_names, kmer_lengths, false);
Expand Down

0 comments on commit cfa6a49

Please sign in to comment.