aclfvInit

Applicable Products

Product

Supported

Ascend 950PR&950DT products

×

Atlas A3 products

×

Atlas A2 products

×

Atlas 200I/500 A2 inference products

×

Atlas inference products

√

Atlas training products

×

Description

Initializes the feature search module. aclfvInit can be called only once within a single process and must be used together with aclfvRelease.

The feature vector search function depends on the header file in the ${INSTALL_DIR}/include/acl/ops/acl_fv.h directory and the library file in the ${INSTALL_DIR}/lib64/libacl_retr.so directory. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.

Atlas inference accelerator modules do not support this API.

Prototype

1
aclError aclfvInit(aclfvInitPara *initPara)

Parameters

Parameter

Input/Output

Description

initPara

Input

Pointer to the initialization parameters for feature vector search. For the type definition, see aclfvInitPara.

  • Call aclfvCreateInitPara to create data of the aclfvInitPara type.
  • In 1:N mode, call aclfvSet1NTopNum to set the maximum number of results (topK) to return. If it is not set, top 4,800 results are returned by default.
  • In N:M mode, call aclfvSetNMTopNum to set the maximum number of results (topK) to return. If it is not set, top 500 results are returned by default.

Return Value

0 on success; else, failure. For details, see aclError.