aclSetTensorConst
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Sets a constant input for an operator and specifies the memory address for storing the input tensor data and address length.
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 memory address of the input tensor data. In In In Open Ctrl CPU form, allocate memory on the device. For details about the memory allocation APIs, see Memory Management. |
length |
Input |
Length of the memory address, in bytes. |
Returns
0 on success; else, failure. For details, see aclError.