NVIDIA / NVIDIA/cuvs

[BUG] Single gpu K-means peak memory footprint is 2x the dataset size.

Open
#1,773 1 comment 0 reactions 1 assignee View on GitHub

@HowardHuang1 is already working on this.

Since Feb 7, 2026.

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

Description

Describe the bug
Ran kmeans with variable dataset size and monitored gpu memory at 1 sec interval via pynvml. Suspecting that there is a dataset copy that is leading to a near 2x peak memory overhead. This also limits the largest shard that can be clustered per gpu hence impacting the search accuracy of the index.

Image

Steps/Code to reproduce bug
GITHUB
Installation: Follow the instructions in the Github README.md
Execution: Run this notebook for running clustering and monitoring.
Dataset: Bao to share 10M, 1024D, FP32; MIRACL embeddings (via slack / google drive).

Expected behavior
peak gpu memory overhead = 1-1.2x dataset_size

Environment details (please complete the following information):

  • Environment location: On-prem
  • Method of cuVS install: conda
  • Machine Specs: 1xA100 (80 GB), 128 vCPU (2x AMD EPYC 7532 @ 2.4GHz)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.