Skip to content

Commit 3ec2fbd

Browse files
tarang-jainfacebook-github-bot
authored andcommitted
Update CAGRA docs (#4152)
Summary: Update CAGRA train and add docs to reflect current capabilities. Pull Request resolved: #4152 Reviewed By: mnorris11 Differential Revision: D68901974 Pulled By: asadoughi fbshipit-source-id: 2667466286a48f7ed76017388f8bbd880025afdd
1 parent 6718dae commit 3ec2fbd

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

faiss/gpu/GpuIndexCagra.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ struct GpuIndexCagra : public GpuIndex {
245245
faiss::MetricType metric = faiss::METRIC_L2,
246246
GpuIndexCagraConfig config = GpuIndexCagraConfig());
247247

248-
/// Trains CAGRA based on the given vector data
248+
/// Trains CAGRA based on the given vector data.
249+
/// NB: The use of the train function here is to build the CAGRA graph on
250+
/// the base dataset and is currently the only function to add the full set
251+
/// of vectors (without IDs) to the index. There is no external quantizer to
252+
/// be trained here.
249253
void train(idx_t n, const float* x) override;
250254

251255
/// Initialize ourselves from the given CPU index; will overwrite

faiss/gpu/impl/CuvsCagra.cuh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ class CuvsCagra {
118118
const int dim_;
119119

120120
/// Controls the underlying cuVS index if it should store the dataset in
121-
/// device memory
122-
bool store_dataset_;
121+
/// device memory. Default set to true for enabling search capabilities on
122+
/// the index.
123+
/// NB: This is also required to be set to true for deserializing
124+
/// an IndexHNSWCagra object.
125+
bool store_dataset_ = true;
123126

124127
/// Metric type of the index
125128
faiss::MetricType metric_;

0 commit comments

Comments
 (0)