Function Description
The IndexILFlat is inherited from the IndexIL. It is an on-device retrieval solution and uses resources such as the Ascend AI Processor and AI Core to enable each API. Programs need to be compiled on the host to generate binary files, and the binary files and related runtime dependencies are deployed on the device for execution. IndexILFlat needs to use Init to initialize corresponding resources. After the initialization is complete, a complete space is allocated to store the database. Then, call Finalize to destroy the resources.
Currently, the functions and performance of the IndexILFlat solution are maintained only on the Atlas inference product. The base vectors and query vectors are normalized by users, and APIs support only the vector inner product distance. For details, see IndexILFlat. (The successful running of this algorithm depends on the .om file of the TIK operator. In the pure device scenario, ensure that the .om file generated based on the Index SDK deliverables is deployed and that the .om file is not tampered with.)
Multi-thread concurrent calling is supported. You need to set the environment variable MX_INDEX_MULTITHREAD to 1, that is, export MX_INDEX_MULTITHREAD=1. If this variable is set to another value or is not set, the multi-thread function is disabled. Currently, FeatureRetrieval uses the OMP for performance acceleration. The OMP cannot be used together with other multi-thread mechanisms. If new threads are repeatedly created to use the OMP, the memory usage keeps increasing. Therefore, you are advised to use fixed threads to run retrieval tasks.