Function: set_nm_top_num

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

Sets the maximum number of results (topK) returned in the N:M search mode. If it is not set, top 500 results are returned by default.

The Atlas inference accelerator modules in the Atlas inference products does not support this API.

Prototype

  • C Prototype
    1
    aclError aclfvSetNMTopNum(aclfvInitPara *initPara, uint32_t maxTopNumForNM)
    
  • Python Function
    1
    ret = acl.fv.set_nm_top_num(init_para, max_top_num_for_nm)
    

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.

max_top_num_for_nm

Int, maximum number of results (topK) returned in N:M mode. Must be in the range of [500, 4800].

Return Value Description

Return Value

Description

ret

Int, error code.

Reference

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