AscendIndexInt8IVF

API Definition

AscendIndexInt8IVF(int dims, faiss::MetricType metric, int nlist, AscendIndexInt8IVFConfig config = AscendIndexInt8IVFConfig())

Function

Constructor of AscendIndexInt8IVF. The NPU resources are set based on the value configured in config.

Input

int dims: dimensions of a group of feature vectors managed by AscendIndexInt8IVF.

faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity. Currently, faiss::MetricType::METRIC_L2 and faiss::MetricType::METRIC_INNER_PRODUCT are supported.

int nlist: number of cluster centroids.

AscendIndexInt8IVFConfig config: resource configuration on the NPU.

Output

N/A

Return Value

N/A

Restrictions

  • The value of dims is an integer ranging from 64 to 1024 and must be exactly divided by 64.
  • nlist ∈ {1024, 2048, 4096, 8192, 16384}