From c69385f46e75b15e01d7589f662be05e35c774df Mon Sep 17 00:00:00 2001 From: "Artem M. Chirkin" <9253178+achirkin@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:12:45 +0200 Subject: [PATCH] Avoid rounding down graph degrees during subindex build --- cpp/src/neighbors/detail/cagra/cagra_build.cuh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/neighbors/detail/cagra/cagra_build.cuh b/cpp/src/neighbors/detail/cagra/cagra_build.cuh index e0ca8fe0be..c31c90ce3a 100644 --- a/cpp/src/neighbors/detail/cagra/cagra_build.cuh +++ b/cpp/src/neighbors/detail/cagra/cagra_build.cuh @@ -1390,6 +1390,8 @@ index build_ace(raft::resources const& res, ef_construction, cuvs::neighbors::cagra::hnsw_heuristic_type::SAME_GRAPH_FOOTPRINT, params.metric); + // avoid rounding down graph_degree via heuristics doing `(graph_degree / 2) * 2` + sub_index_params.graph_degree = graph_degree; sub_index_params.attach_dataset_on_build = false; sub_index_params.guarantee_connectivity = params.guarantee_connectivity;