Function: init

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

x

Atlas A2 training products / Atlas A2 inference products

x

Atlas training products

x

Atlas inference products

Atlas 200I/500 A2 inference products

x

Function Usage

Initializes the feature search module. Used in pair with acl.fv.release.

The Atlas inference accelerator modules does not support these APIs.

Prototype

  • C Prototype
    1
    aclErroraclfvInit(aclfvInitPara *initPara)
    
  • Python Function
    1
    ret = acl.fv.init(init_para)
    

Parameter Description

Parameter

Description

init_para

Int, initialization configuration for feature vector search.

  • Call acl.fv.create_init_para to create data of the aclfvInitPara type in advance.
  • In 1:N mode, call acl.fv.set_1n_top_num to set the maximum number of results (topK) to return. If it is not set, top 4800 results are returned by default.
  • In N:M mode, call acl.fv.set_nm_top_num to set the maximum number of results (topK) to return. If it is not set, top 500 results are returned by default.

Return Value Description

Return Value

Description

ret

Int, error code.

Restrictions

acl.fv.init can be called only once per process.

Reference

For details about the API call sequence and sample code, see Feature Vector Search.