SetStorageShape
Function Usage
Sets the StorageShape attribute of an aclTensor.
OriginShape indicates the original shape information of the aclTensor before it passes through the transdata node (if any), that is, the mathematical description of the tensor shape.
StorageShape indicates the actual layout of the aclTensor in the memory, that is, the actual shape format of OriginShape.
Prototype
void SetStorageShape(const op::Shape &shape)
Parameters
Returns
None
Constraints
None
Example
1 2 3 4 5 6 7 8 |
// Set StorageShape of the input to [1, 2, 3, 4, 5]. void Func(aclTensor *input) { gert::Shape newShape; for (int64_t i = 1; i <= 5; i++) { newShape.AppendDim(i); } input->SetStorageShape(newShape); } |
Parent topic: common_types