GetOriginalShape

Description

Obtains the OriginShape 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.

Prototype

gert::Shape GetOriginalShape()

Parameters

None.

Returns

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

For details about gert::Shape, see gert::Shape in Basic Data Structures and APIs.

Constraints

None.

Example

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