Function: set_tensor_const
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Sets a constant input for an operator and specifies the memory address for storing the input tensor data and address length.
Prototype
- C Prototype
1aclError aclSetTensorConst(aclTensorDesc *desc, void *dataBuffer, size_t length)
- Python Function
1ret = acl.set_tensor_const(desc, dataBuffer, length)
Parameters
|
Parameter |
Description |
|---|---|
|
desc |
Int, pointer address of the aclTensorDesc type. Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance. |
|
dataBuffer |
Int, address of the memory for storing the constant input tensor data. The memory for storing the input tensor data of the operator must be determined based on the application running mode. For details about the memory allocation APIs, see Memory Management.
|
|
length |
Int, length of the memory address, in bytes. |