AscendIndexIVFast
API Definition |
AscendIndexIVFast(int dimIn, int dimOut, int nlist, faiss::ScalarQuantizer::QuantizerType qtype = ScalarQuantizer::QuantizerType::QT_8bit, faiss::MetricType metric = MetricType::METRIC_INNER_PRODUCT, AscendIndexIVFastConfig config = AscendIndexIVFastConfig()) |
|---|---|
Function |
Constructor of AscendIndexIVFast, which is used to generate AscendIndexIVFast. The NPU resources are set based on the value configured in config. |
Input |
int dimIn: dimensions of a group of original feature vectors managed by AscendIndexIVFast. int dimOut: dimensions of a group of dimension-reduced feature vectors managed by AscendIndexIVFast. int nlist: number of cluster centroids, which corresponds to coarse_centroid_num in the operator generation script. faiss::ScalarQuantizer::QuantizerType qtype: quantizer type of AscendIndexIVFast. faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity. AscendIndexIVFastConfig config: resource configuration on the NPU. |
Output |
N/A |
Return Value |
N/A |
Restrictions |
|