Skip to content

Commit 9ad0367

Browse files
Adjust Cagra Index degree to fit the default performance of
Elasticsearch
1 parent 1f742f4 commit 9ad0367

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

x-pack/plugin/gpu/src/main/java/org/elasticsearch/xpack/gpu/codec/GPUToHNSWVectorsWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ private String buildGPUIndex(VectorSimilarityFunction similarityFunction, Datase
263263
// TODO: expose cagra index params of intermediate graph degree, graph degree, algorithm, NNDescentNumIterations
264264
CagraIndexParams params = new CagraIndexParams.Builder().withNumWriterThreads(1) // TODO: how many CPU threads we can use?
265265
.withCagraGraphBuildAlgo(CagraIndexParams.CagraGraphBuildAlgo.NN_DESCENT)
266+
.withGraphDegree(16)
266267
.withMetric(distanceType)
267268
.build();
268269

0 commit comments

Comments
 (0)