aicpu_task
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 |
|---|---|
PrintAicpuAllTimeStampInfo(const char *opType) |
Prints the system timestamp when an AI CPU task is executed. |
AppendTensor(aclOpExecutor *executor, const aclTensor *arg, V &l) |
Appends an aclTensor pointer to the template function in the container. |
AppendTensor(aclOpExecutor *executor, const aclScalar *arg, V &l) |
|
AppendTensor(aclOpExecutor *executor, const aclIntArray *arg, V &l) |
|
AppendTensor(aclOpExecutor *executor, const aclTensorList *arg, V &l) |
|
CreateTensorListImpl(aclOpExecutor *executor, OpArg &arg, TensorList &l) |
Creates a tensor list template function from the input arguments. |
CreateTensorList(aclOpExecutor *executor, OpArgList &t, TensorList &l) |
Creates a tensor list. |
Append1Byte(uint8_t *buf, uint8_t src) |
Appends a byte to the specified buffer. |
AppendAttrForKey(const V &value, uint8_t *&key, size_t &keyLen) |
Appends the attribute template function to the task key field. |
AppendAttrForKey(const std::string &value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(const std::string *value, uint8_t *&key, size_t &keyLen) |
Appends attribute information to the key. |
AppendAttrForKey(std::string *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(const std::vector<V> &value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(const aclIntArray *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(aclIntArray *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(const aclFloatArray *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(aclFloatArray *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(const aclBoolArray *value, uint8_t *&key, size_t &keyLen) |
|
AppendAttrForKey(aclBoolArray *value, uint8_t *&key, size_t &keyLen) |
|
AddAicpuAttr(const aclIntArray *value, const std::string &attrName, AicpuAttrs &attrs) |
Adds the AI CPU attribute field. |
AddAicpuAttr(aclIntArray *value, const std::string &attrName, AicpuAttrs &attrs) |
|
AddAicpuAttr(const aclFloatArray *value, const std::string &attrName, AicpuAttrs &attrs) |
|
AddAicpuAttr(aclFloatArray *value, const std::string &attrName, AicpuAttrs &attrs) |
|
AddAicpuAttr(const aclBoolArray *value, const std::string &attrName, AicpuAttrs &attrs) |
|
AddAicpuAttr(aclBoolArray *value, const std::string &attrName, AicpuAttrs &attrs) |
|
AddAicpuAttr(const V &value, const std::string &attrName, AicpuAttrs &attrs) |
Adds simple data type attributes to the AI CPU attribute map. |
GetTid() |
Obtains the ID of the current working thread. |
aclnnAicpuFinalize() |
Deinitializes the AI CPU module. |
CreatAicpuKernelLauncher(uint32_t opType, op::internal::AicpuTaskSpace &space, aclOpExecutor *executor, const FVector<std::string> &attrNames, op::OpArgContext *args) |
Creates an AI CPU task delivery object. |
AicpuTask() |
Indicates the default constructor of the AicpuTask class. |
AicpuTask(const std::string &opType, const ge::UnknowShapeOpType unknownType) |
Indicates the constructor (with arguments) of the AicpuTask class. |
AicpuTfTask(const std::string &opType, const ge::UnknowShapeOpType unknownType) |
Indicates the constructor for an AI CPU TensorFlow task. |
aclnnStatus Init(const FVector<const aclTensor *> &inputs, const FVector<aclTensor *> &outputs, const AicpuAttrs &attrs) |
Initializes a task under the operator framework. |
aclnnStatus Run(aclOpExecutor *executor, aclrtStream stream) |
Runs a task under the operator framework. |
AicpuTask(const std::string &opType, const ge::UnknowShapeOpType unknownType) |
Indicates the constructor for an AI CPU task. |
AicpuCCTask(const std::string &opType, const ge::UnknowShapeOpType unknownType) |
Indicates the constructor for an AI CPU CANN task. |
aclnnStatus SetIoTensors(aclOpExecutor *executor, op::OpArgContext *args) |
Refreshes the input and output addresses of a task. |
void SetSpace(void *space) |
Sets the container where the task is located. |
void SetVisit(bool visit) |
Sets whether a task is occupied. |
AicpuTaskSpace(const std::string &opType, const ge::UnknowShapeOpType unknownType = ge::DEPEND_IN_SHAPE, const bool isTf = false) |
Indicates the constructor for an AI CPU task container. |
AicpuTask *FindTask(aclOpExecutor *executor, op::OpArgContext *args, const FVector<const aclTensor *> &inputs) |
Checks whether a task can be reused. |
AicpuTask *GetOrCreateTask(aclOpExecutor *executor, const FVector<std::string> &attrNames, op::OpArgContext *args) |
Obtains a new or reused task. |
void SetRef(const size_t index, const bool isInput = true) |
Sets the specified index to the reference type. |
bool IsRef(const size_t index, const bool isInput = true) const |
Checks whether the specified index is of the reference type. |
uint64_t CalcHostInputDataSize(const FVector<const aclTensor *> &inputs, size_t alignBytes) const |
Obtains the total size of data on the host. |
uint64_t CalcDeviceCacheSize(const FVector<const aclTensor *> *&inputs, std::unique_ptr<AicpuTask> &aicpuTask) const |
Calculates the size of the memory reserved on the device. |
void Clear() |
Clears cached tasks. |
static size_t GenHashBinary(const uint8_t *addr, uint32_t len) |
Obtains the key value seed of the hash table of a task. |
size_t GenTaskKey(uint8_t inputKey[], size_t &keyLen, op::OpArgContext *args, const FVector<const aclTensor *> &inputs) const |
Generates a task key. |