AscendIndexIVFSQFuzzy

API Definition

AscendIndexIVFSQFuzzy(const faiss::IndexIVFScalarQuantizer *index, AscendIndexIVFSQFuzzyConfig config = AscendIndexIVFSQFuzzyConfig())

Function

Constructor of AscendIndexIVFSQFuzzy, which is used to create a retrieval index on the Ascend based on an existing index.

Input

const faiss::IndexIVFScalarQuantizer *index: resource configuration on the CPU.

AscendIndexIVFSQFuzzyConfig config: resource configuration on the NPU.

Output

N/A

Return Value

N/A

Restrictions

The index must be a valid CPUindex pointer. The member variables of the index must meet the following requirements:

  • dim ∈ {64, 128, 256, 384, 512, 1024, 2048}
  • nlist ∈ {1024, 2048, 4096, 8192, 16384, 32768}
  • qtype = ScalarQuantizer::QuantizerType::QT_8bit (Currently, only ScalarQuantizer::QuantizerType::QT_8bit is supported.)
  • metric = faiss::MetricType::METRIC_INNER_PRODUCT