Overview

The feature retrieval solution uses the TIK operators to implement the calculation logic on feature distance. The custom operators are as follows.

  1. PQ distance accumulation operator: uses vector complex add (VCADD) for accumulation and multi-core calculation.
  2. PQ distance calculation operator: obtains the L2 distance between the long feature library data and the long feature vector to be retrieved.
  3. PQ distance table generation operator: it is loaded to all Ascend 310 AI Processors simultaneously, and then generates the same distance table on each Ascend 310 AI Processor.
  4. PCA dimension reduction operator: reduces the dimensions of long feature vectors.
  5. Flat distance calculation operator: obtains the distance (L2/IP) between the feature library data and the feature vector to be retrieved.
  6. SQ8 distance calculation operator: obtains the distance (L2/IP) between the SQ-quantized feature library data and the unquantized feature vector to be retrieved.
  7. IVFSQ8 operator: obtains the IVFSQ8 algorithm.
  8. IVFPQ operator: obtains the IVFPQ algorithm.
  9. INT8 distance calculation operator: obtains the distance (L2/COS) between the feature library data and the feature vector to be retrieved, both of which are quantized by INT8.
  10. IVFINT8: obtains the IVFINT8 algorithm.
  11. IVFSQT operator: obtains all operators required in the IVFSQT and IVFast solutions.
  12. FlatAT operator: reduces the time required by train and add operations in the IVF scenario. code_num is equal to nlist.
  13. FlatInt8AT operator: reduces the time required by train, add, and update operations in the Atlas inference products.
  14. AICPU operator: classifies base libraries and performs sorting.