AscendIndexIVFSQC

API Definition

AscendIndexIVFSQC(const faiss::IndexIVFScalarQuantizer *index, AscendIndexIVFSQCConfig config = AscendIndexIVFSQCConfig())

Function

Constructor of AscendIndexIVFSQC, 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.

AscendIndexIVFSQCConfig config: resource configuration on the NPU.

Output

N/A

Return Value

N/A

Restrictions

  • The index must be a valid CPUindex pointer.
  • index->d ∈ {64, 128, 256, 384, 512, 1024}
  • index->sq.d ∈ {32, 64, 96, 128}
  • The dimension of index must be greater than that of index->sq and can be divided by the index->sq dimension.