AscendIndexIVFSQTConfig

API Definition

inline AscendIndexIVFSQTConfig(std::vector<int> devices, int64_t resourceSize = IVFSQT_DEFAULT_TEMP_MEM)

Function

Constructor of AscendIndexIVFSQTConfig, which is used to generate AscendIndexIVFSQTConfig and perform default initialization. The processor resources on the NPU and resource pool size are set based on the value configured in devices.

Input

std::vector<int> devices: processor resources on the NPU.

int64_t resourceSize: preset memory pool size on the device, in bytes. It is the memory space for storing intermediate results during computing to prevent performance fluctuation caused by dynamic memory allocation. The default parameter is IVFSQT_DEFAULT_TEMP_MEM in the header file. This parameter is determined by the base library capacity and the number of search batches. If the base library has 10 million records or more and the number of the batches is greater than or equal to 16, set this parameter to 1024 MB.

Output

N/A

Return Value

N/A

Restrictions

  • The value of devices must be a valid processor ID.
  • The value of resourceSize cannot exceed 1024 MB (1024 x 1024 x 1024 bytes).