Developing cuNIBS
Bug reports
Section titled “Bug reports”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
Section titled “Pull requests”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.
Local development
Section titled “Local development”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.
nvccmust be onPATH, orCUDACXXmust 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:
git clone https://github.com/vcubiomag/cunibs.gitcd cunibsuv sync --extra cu13-localuv run pytestThe 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.
cd docspnpm install --frozen-lockfilepnpm devRun pnpm build from docs/ to check the production build.