NVIDIA / NVIDIA/cuvs

[BUG] ubuntu 24 conda free build process does not work

Open
#1,231 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

Describe the bug
Ubuntu 24 conda free build process does not work

Steps/Code to reproduce bug
Rent a clean ubuntu 24 image on AWS (I rented g6.4xlarge)
git clone https://github.com/rapidsai/cuvs.git
cd cuvs/cpp/build

cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/ubuntu/cuda_install -DCMAKE_CUDA_ARCHITECTURES=native -DBUILD_TESTS=ON -G Ninja

ninja
[fails because ubu 24 is cmake version 3.28.3]

git checkout branch-24.06 (I picked this number because our AI overlords said it was the magic number)

try to ninja:

/home/ubuntu/cuvs/cpp/src/neighbors/cagra_optimize.cu: In function ‘void cuvs::neighbors::cagra::optimize(const raft::resources&, raft::device_matrix_view<unsigned int, long int, std::experimental::layout_right>, raft::host_matrix_view<unsigned int, long int, std::experimental::layout_right>)’:
/home/ubuntu/cuvs/cpp/src/neighbors/cagra_optimize.cu:22:6: error: infinite recursion detected [-Werror=infinite-recursion]
22 | void optimize(raft::resources const& handle,
| ^~~~~~~~

Expected behavior
I would like 4 things to happen

  1. Stop requiring a cmake version thats later that the latest ubuntu 24 LTS image
  2. Stop having examples that cant be built independently of everything else on latest Ubuntu LTS. The flags you need to nvcc should be immediately visible in the source and documentation.
  3. Have directions that show how to build conda free cpp library on Ubuntu LTS latest. Conda is not production software. Ubuntu LTS latest is super common.
  4. No core dumps on examples

BTW one of the examples core dumped on me:
(base) ubuntu@ip-172-31-18-1:/cuVStestphilip$ nvcc -std=c++17 -O3 -I$CONDA_PREFIX/include -L$CONDA_PREFIX/lib -lcuvs -lrmm -lrapids_logger -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -DRAFT_ENABLE_CUDA=1 --extended-lambda --expt-relaxed-constexpr -Xcompiler -fPIC cagra_persistent_example.cu -o cagra_persistent_example
nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
(base) ubuntu@ip-172-31-18-1:
/cuVStestphilip$ ./cagra_persistent_example
Building CAGRA index (search graph)
[ 34612][11:44:09:282043][info ] optimizing graph
[ 34612][11:44:14:552941][info ] Graph optimized, creating index
CAGRA index has 1000000 vectors
CAGRA graph has degree 64, graph size [1000000, 64]
terminate called after throwing an instance of 'raft::cuda_error'
what(): CUDA error encountered at: file=/home/ubuntu/miniforge3/include/raft/core/interruptible.hpp line=303: call='query_result', Reason=cudaErrorIllegalAddress:an illegal memory access was encountered
Obtained 8 stack frames
#1 in ./cagra_persistent_example(+0x22a61) [0x5d05acf27a61]
#2 in ./cagra_persistent_example: void raft::interruptible::synchronize_impl<cudaError ()(CUstream_st), rmm::cuda_stream_view>(cudaError ()(CUstream_st), rmm::cuda_stream_view) +0x219 [0x5d05acf33f69]
#3 in ./cagra_persistent_example(+0x1b07c) [0x5d05acf2007c]
#4 in ./cagra_persistent_example(+0x1ba73) [0x5d05acf20a73]
#5 in ./cagra_persistent_example(+0x1783b) [0x5d05acf1c83b]
#6 in /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x77c3dc62a1ca]
#7 in /lib/x86_64-linux-gnu/libc.so.6: __libc_start_main +0x8b [0x77c3dc62a28b]
#8 in ./cagra_persistent_example(+0x17c55) [0x5d05acf1cc55]Aborted (core dumped)

Environment details (please complete the following information):
ubuntu 24 image on AWS (I rented g6.4xlarge) ubuntu 24 image - not the pro one

Additional context
I am trying to build the C++ dev/run environment and the examples. I dont care about other stuff.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Ubuntu 24 build from cpp/build with the reported CMake and Ninja command. Inspect cpp/src/neighbors/cagra_optimize.cu around line 22 and the cagra_persistent_example.cu invocation, then compare the build and example failures. Done means the C++ library and examples build on the latest Ubuntu 24 image without the reported compiler failure or core dump, with the required flags documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, ubuntu
Domain
build-system, documentation, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.