GetStorageShape

Function Usage

Obtains 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

gert::Shape GetStorageShape()

Parameters

None

Returns

gert::Shape, which records a group of shape information, for example, a 3D shape [10, 20, 30].

Constraints

None

Example

1
2
3
void Func(const aclTensor *input) {
    auto shape = input->GetStorageShape();
}