Function: init

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

x

Atlas A2 products

x

Atlas training products

x

Atlas inference products

√

Atlas 200I/500 A2 inference products

x

Description

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

This API is not supported for Atlas inference accelerator modules.

Prototype

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

Parameters

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 Values

Return Value

Description

ret

Int, error code.

Constraints

acl.fv.init can be called only once in a process.

Reference

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