Function: create_feature_info

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

Creates data of the aclfvFeatureInfo type as a feature description.

To destroy data of the aclfvFeatureInfo type, call Function: destroy_feature_info.

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

Prototype

  • C Prototype
    1
    aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset, uint32_t featureLen,uint32_t featureCount, uint8_t *featureData, uint32_t featureDataLen)
    
  • Python Function
    1
    feature_info = acl.fv.create_feature_info(id0, id1, offset, feature_len, feature_count, feature_data, feature_len)
    

Parameter Description

Parameter

Description

id0

Int, repository 0 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode. id0 and id1 together identify a repository.

id1

Int, repository 1 ID. Must be within [0, 1023]. Defaults to 0 in N:M mode. id0 and id1 together identify a repository.

offset

Int, offset of the first feature to be added in the repository. The offset value must be the same as the number of features added to the repository. In N:M mode, the default value is 0.

feature_len

Int, feature length, fixed at 36 bytes. The system verifies the length internally.

feature_count

Int, number of features, up to 1 million in 1:N mode or up to 10 million in N:M mode.

feature_data

Int, feature values, which are stored contiguously based on the feature length. The first 4 bytes of each feature are 0.

feature_len

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

Return Value Description

Return Value

Description

feature_info

Int, pointer address.

  • Success: data of the aclfvFeatureInfo type
  • If 0 is returned, the operation fails.

Reference

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