aclSetTensorConst
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
1 | 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 Ctrl CPU open form, allocate memory on the device. |
length |
Input |
Length of the memory address, in bytes. |
Returns
0 on success; else, failure. For details, see aclError.