FlatAT

Currently, the FlatAT operator is used together with the IVF operator to accelerate the add and train operations of the IVF operator. The FlatAT operator cannot be directly called. The acceleration of add and train is specified by AscendIndexIVFConfig.useKmeansPP in the IVF. In this case, only the training job whose scale is smaller than 10,000,000 is supported.

Usage

python3 flat_at_generate_model.py --cores <core_num> -d <dim> -c <code_num> -p <process_id>

Parameter

<dim>: dimension of the input feature vector.

<code_num>: number of base library features to be compared with the input features.

<core_num>: number of AI Cores of the Ascend AI Processor. The default value is 2.

<process_id>: ID of the process for batch generating operator multi-process scheduling tasks.

Description

Run the command to obtain a group of operator model files.

The FlatAT operator is used in the IVF scenario to reduce the time required for train and add functions.

Restrictions

  • dim ∈ {128, 256, 384}
  • code_num ∈ {1024, 2048, 4096, 8192, 16384, 32768}