AscendIndexInt8Config
AscendIndexInt8 requires the corresponding AscendIndexInt8Config to initialize related resources.
Member Description
Member |
Type |
Description |
|---|---|---|
deviceList |
std::vector<int> |
Device ID |
resourceSize |
int64_t |
Size of the memory pool preset on the device, in bytes. |
API Description
API definition |
AscendIndexInt8Config() |
|---|---|
Function |
Default constructor of AscendIndexInt8Config. By default, deviceList is set to 0, indicating that the 0th Ascend AI Processor is specified as the heterogeneous computing platform for AscendFaiss to perform retrieval. In addition, the resource pool size is fixed to the default value. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
API definition |
AscendIndexInt8Config(std::initializer_list<int> devices, int64_t resources = INDEX_INT8_DEFAULT_MEM) |
|---|---|
Function |
Constructor of AscendIndexInt8Config, which is used to generate AscendIndexInt8Config. The Ascend AI Processor resources on the device and the resource pool size are configured based on the value configured in devices. |
Input |
std::initializer_list<int> devices: device ID int64_t resources: 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 INDEX_INT8_DEFAULT_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 10 million vectors and batch size is greater than or equal to 16, set this parameter to 1024 MB. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|
API definition |
AscendIndexInt8Config(std::vector<int> devices, int64_t resources = INDEX_INT8_DEFAULT_MEM) |
|---|---|
Function |
Constructor of AscendIndexInt8Config, which is used to generate AscendIndexInt8Config. The Ascend AI Processor resources on the device and the resource pool size are configured based on the value configured in devices. |
Input |
std::vector<int> devices: device ID int64_t resources: 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 INDEX_INT8_DEFAULT_MEM in the header file. This parameter is determined by the database capacity and search batch size. If the database has 10 million vectors and batch size is greater than or equal to 16, set this parameter to 1024 MB. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|