Function: create_query_table

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

Creates data of the aclfvQueryTable type as a search input table.

To destroy data of the aclfvQueryTable type, call Function: destroy_query_table.

This API is not supported for Atlas inference accelerator modules in Atlas inference products.

Prototype

  • C Prototype
    1
    aclfvQueryTable *aclfvCreateQueryTable(uint32_t queryCnt, uint32_t tableLen, uint8_t *tableData, uint32_t tableDataLen)
    
  • Python Function
    1
    query_table = acl.fv.create_query_table(query_cnt, table_len, table_data, table_data_len)
    

Parameters

Parameter

Description

query_cnt

Int, number of search requests, fixed at 1 in 1:N mode or up to 1024 in N:M mode.

table_len

Int, table length, fixed at 32 KB. The system verifies the length internally.

table_data

Int, feature value table, stored consecutively based on the feature length.

table_data_len

Int, length of the memory allocated to tableData, which is used for verification.

Return Values

Return Value

Description

query_table

Int, pointer address.

  • Data of the aclfvQueryTable type: success
  • 0: failure

Reference

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