Function: set_nm_top_num

C Prototype

aclError aclfvSetNMTopNum(aclfvInitPara *initPara, uint32_t maxTopNumForNM)

Python Function

ret = acl.fv.set_nm_top_num(init_para, max_top_num_for_nm)

Function Usage

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

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Input Description

  • init_para: int, initialization parameter 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 (maximum topk) returned in the N:M search mode. Must be in the range of [500, 4800].

Return Value

ret: int, error code.

Restrictions

None