aclSetTensorConst
Description
Sets a constant input for an operator and specifies the input memory.
Prototype
aclError aclSetTensorConst(aclTensorDesc *desc, void *dataBuffer, size_t length)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
desc |
Output |
Pointer to data of the aclTensorDesc type. Call aclCreateTensorDesc to create data of the aclTensorDesc type in advance. |
dataBuffer |
Input |
Pointer to the buffer address of the input tensor data. Determine the memory allocation method based on the app run mode. If the app runs on the host, allocate host memory. If the app runs on the device, allocate device memory. For details about the buffer allocation API, see Memory Management. |
length |
Input |
Memory size in bytes. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: aclTensorDesc