AscendNNInference

API definition

AscendNNInference(std::vector<int> deviceList, const char* model, uint64_t modelSize);

Function

Constructor of AscendNNInference, which generates AscendNNInference. The Ascend AI Processor resources on the device and model path are set based on the values configured in deviceList.

Input

std::vector<int> deviceList: device ID

const char* model: neural dimension reduction model.

uint64_t modelSize: size of the neural dimension reduction model.

Output

N/A

Return value

N/A

Restrictions

  • Value range of deviceList: (0, 32].
  • model must be a valid memory pointer of the neural dimension reduction model. modelSize indicates its size and the value range is (0, 128 MB]. If the parameters do not match, model instantiation or inference may fail. An invalid model may damage the system. Ensure that the model source is valid.
    • dimsIn ∈ {64, 128, 256, 384, 512, 768, 1024}
    • dimsOut ∈ {32, 64, 96, 128, 256}
    • batches ∈ {1, 2, 4, 8, 16, 32, 64, 128}

API definition

AscendNNInference(const AscendNNInference&) = delete;

Function

Declares that the copy constructor of this Index class is void, that is, it cannot be copied.

Input

const AscendNNInference&: constant AscendNNInference

Output

N/A

Return value

N/A

Restrictions

N/A