AscendVectorTransform

API Definition

explicit AscendVectorTransform(int dimIn = 0, int dimOut = 0, AscendVectorTransformConfig config = AscendVectorTransformConfig()

Function

Constructor of AscendVectorTransform, which is used to generate AscendVectorTransform. The processor resources on the NPU are set based on the value configured in config.

Input

int dimIn: input dimension of the linear transformation.

int dimOut: output dimension of the linear transformation.

AscendVectorTransformConfig config = AscendVectorTransformConfig(): resource configuration for linear transformation on the NPU.

Output

N/A

Return Value

N/A

Restrictions

dinIn∈{32, 64, 128, 256, 384, 512, 1024}

dinOut∈{32, 64, 128, 256, 384, 512, 1024}

The values of dimIn and dimOut need to be the same as those of Faiss because of forward compatibility, and retain the default value 0. The dimension cannot be 0 during program running. In addition, AscendVectorTransform inherits the pure virtual function apply_noalloc of Faiss and cannot be directly instantiated.