Skip to content

Conversation

@irina-resh-nvda
Copy link
Contributor

Building cuVS benchmarks in Debug mode would fail during linker step with the following (e.g.) message
[ 97%] Built target cuvs_c /usr/bin/ld: ../../libcuvs.so: undefined reference to cuvs::neighbors::hnsw::index::set_ef(int) const'
/usr/bin/ld: ../../libcuvs.so: undefined reference to cuvs::neighbors::hnsw::index<__half>::set_ef(int) const' /usr/bin/ld: ../../libcuvs.so: undefined reference to cuvs::neighbors::hnsw::index::set_ef(int) const'
/usr/bin/ld: ../../libcuvs.so: undefined reference to cuvs::neighbors::hnsw::index<signed char>::set_ef(int) const'
An example CMake command:
cmake .. -DCUVS_NVTX=ON -DBUILD_MG_ALGOS=OFF -DBUILD_TESTS=OFF -DBUILD_C_TESTS=OFF -DBUILD_CUVS_BENCH=ON -DCUVS_ANN_BENCH_USE_FAISS_GPU_FLAT=OFF -DCUVS_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT=OFF -DCUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA=OFF -DCUVS_ANN_BENCH_USE_FAISS_GPU_IVF_PQ=OFF -DCUVS_ANN_BENCH_USE_FAISS_CPU_FLAT=OFF -DCUVS_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT=OFF -DCUVS_ANN_BENCH_USE_FAISS_CPU_IVF_PQ=OFF -DCUVS_ANN_BENCH_USE_FAISS_CPU_HNSW_FLAT=OFF -DCUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA_HNSW=OFF -DCUVS_ANN_BENCH_USE_CUVS_CAGRA_HNSWLIB=OFF -DCUVS_ANN_BENCH_USE_HNSWLIB=OFF -DCUVS_ANN_BENCH_USE_GGNN=OFF -DCUVS_ANN_BENCH_USE_DISKANN=OFF -DCUVS_ANN_BENCH_USE_CUVS_VAMANA=OFF -DCUVS_ANN_BENCH_USE_CUVS_CAGRA_DISKANN=OFF -DCUVS_ANN_BENCH_USE_CUVS_MG=OFF -DDISABLE_DEPRECATION_WARNINGS=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CUDA_ARCHITECTURES=80 -DCMAKE_BUILD_TYPE=Debug

The same code would still compile in Release mode (probably due to compile optimisation)

The fix just declares
cuvs::neighbors::hnsw::index::set_ef(int) function as purely virtual.

Copy link
Contributor

@mfoerste4 mfoerste4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@irina-resh-nvda
Copy link
Contributor Author

/ok to test 8daad14

@irina-resh-nvda
Copy link
Contributor Author

/ok to test c24f3ee

@irina-resh-nvda
Copy link
Contributor Author

/ok to test de6285b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

4 participants