AscendIndexSQ

API Definition

AscendIndexSQ(const faiss::IndexScalarQuantizer* index, AscendIndexSQConfig config = AscendIndexSQConfig())

Function

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

Input

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

AscendIndexSQConfig config: resource configuration on the NPU.

Output

N/A

Return Value

N/A

Restrictions

The index must be a valid CPUindex pointer. The value range of the index dimension (the value range of the d parameter) is {64, 128, 256, 384, 512}. The number of base libraries cannot exceed 1e9. The value range of metric_type is {faiss::MetricType::METRIC_L2, faiss::MetricType::METRIC_INNER_PRODUCT}. The sq.qtype parameter supports only ScalarQuantizer::QuantizerType::QT_8bit.