Function: set_tensor_const
Applicable Products
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Sets a constant input for an operator and specifies the buffer 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)
Parameter Description
|
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 input tensor of the constant. The memory for storing the input tensor data of the operator must be determined based on the application running mode. For details about the buffer allocation API, see Memory Management.
|
|
length |
Int, length of the memory address, in bytes. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code.
|