Skip to content

Developing cuNIBS

Report bugs as GitHub issues. Include the cuNIBS version, operating system, Python version, GPU model, and NVIDIA driver version. Add a short example that reproduces the problem and the full error message. If the bug depends on a head model, use a public example mesh when possible.

Pull requests are welcome. Open a GitHub issue before writing a pull request so contributors can discuss the proposal and agree on the design. Link the pull request to that issue.

To build and test the library, use an x86-64 Linux or Windows machine with an NVIDIA GPU and uv. The build compiles against the CUDA toolkit on the machine and needs:

  • CUDA toolkit 12.9 or newer. nvcc must be on PATH, or CUDACXX must point to it.
  • A C++20 host compiler that the toolkit supports. On Windows, use Visual Studio 2022 with the C++ workload, and install the toolkit after Visual Studio so its Visual Studio integration is present.

CUDA 13 toolkits include the CCCL 3 headers that the kernels need. With a CUDA 12 toolkit, CMake downloads a CCCL 3.2 release instead. To build offline, pass -DCCCL_DIR=<cccl>/lib/cmake/cccl through CMAKE_ARGS to use a local CCCL 3.2 or newer.

Sync the environment with the -local extra that matches the toolkit, so CuPy uses the same toolkit:

Bash
git clone https://github.com/vcubiomag/cunibs.git
cd cunibs
uv sync --extra cu13-local
uv run pytest

The build targets the GPUs in the machine. To target other GPUs, set CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=...".

The documentation lives in docs/. To preview and build the site, use Node.js 22.23.4 or later and pnpm.

Bash
cd docs
pnpm install --frozen-lockfile
pnpm dev

Run pnpm build from docs/ to check the production build.