aicpu_ext_info_handle
The APIs described in this section are reserved and may be changed or deprecated in the future. They do not need your attention.
API Definition |
Description |
|---|---|
AicpuExtInfoHandler(const std::string &nodeName, const uint32_t inputNum, const uint32_t outputNum, const ge::UnknowShapeOpType unknownType) |
Indicates the constructor for managing AI CPU extended arguments. |
nodeName_(nodeName) |
Indicates the operator name. |
inputNum_(inputNum) |
Indicates the number of operator inputs. |
outputNum_(outputNum) |
Indicates the number of operator outputs. |
unknownType_(unknownType) |
Indicates the type of an operator. |
AicpuExtInfoHandler() |
Indicates the constructor for managing AI CPU extended arguments. |
GenTfExtBuffer(const FVector<const aclTensor *> &inputs, const FVector<aclTensor *> &outputs, std::string &taskExtInfo) |
Generates the extended arguments of the TensorFlow framework. |
GenCCExtBuffer( const FVector<const aclTensor *> &inputs, const FVector<aclTensor *> &outputs, std::string &taskExtInfo) |
Generates the extended arguments of the CANN framework. |
Parse(const std::string &extInfo, uint8_t *hostAddr) |
Parses the extended arguments. |
UpdateInputShape(const uint32_t inputIndex, const gert::Shape &inputShape) |
Updates the input shape in the extended arguments. |
UpdateOutputShape(const uint32_t outputIndex, const gert::Shape &outputShape) |
Updates the output shape in the extended arguments. |
GetOutputShapeAndType(const uint32_t outputIndex, gert::Shape &shape, ge::DataType &dataType) |
Obtains the shape and type in the extended arguments. |
CopyH2D(const rtStream_t stream, const aclOpExecutor *executor, const uint64_t deviceExtMemSize, uint64_t &deviceCacheOffset) |
Copies extended arguments from the host to the device. |
CopyOutputShapeD2H() |
Updates the output shape of the operator on the device to the host. |
GetExtInfoDeviceBuffer(const aclOpExecutor *executor, const uint64_t deviceExtMemSize, uint64_t &deviceCacheOffset) |
Obtains the address of memory reserved on the device for extended arguments. |
GenerateKernelId() |
Generates a kernel ID. |
UpdateOutputShapeFromExtInfo(const FVector<aclTensor *> &outputs, aclrtStream stream) |
Obtains the output shape from the device and updates the information to the host. |
UpdateInputAndOutputShape(const FVector<const aclTensor *> &inputs, const FVector<aclTensor *> &outputs, aclrtStream stream, const aclOpExecutor *executor, const uint64_t deviceExtMemSize, uint64_t &deviceCacheOffset) |
Updates the actual input and output shape to the device before the second phase is executed. |
SetSpace(void *space) |
Sets the task space to be used. |
ParseExtShapeType(AicpuExtInfo &aicpuExtInfo) |
Parses the shape and type in the extended arguments. |
ParseExtInputShape(AicpuExtInfo &aicpuExtInfo) |
Parses the input shape in the extended arguments. |
ParseExtOutputShape(AicpuExtInfo &aicpuExtInfo) |
Parses the output shape in the extended arguments. |
AppendExtOpName(std::string &taskExtInfo) |
Appends the operator name to extended arguments. |
AppendExtShapeType(std::string &taskExtInfo) |
Appends the shape and type to extended arguments. |
AppendExtBitMap(std::string &taskExtInfo) |
Appends bitmap information to extended arguments. |
AppendExtInfoShape(const FVector<const aclTensor *> &tensors, const aicpu::FWKAdapter::FWKTaskExtInfoType type, std::string &taskExtInfo, bool isTf = false) |
Appends shape information to extended arguments. |
AppendSessionInfo(std::string &taskExtInfo) |
Appends session information to extended arguments. |
UpdateShape(const gert::Shape &shape, AicpuShapeAndType *const shapeAndType) |
Updates shape information. |
GetShapeAndType(const AicpuShapeAndType &shapeAndType, gert::Shape &shape, ge::DataType &dataType) |
Obtains the shape and type in the extended arguments. |