GetStorageFormat

Function Usage

Obtains the StorageFormat of an aclTensor.

StorageFormat indicates the layout format of the aclTensor in the memory, such as NCHW and ND.

Prototype

op::Format GetStorageFormat()

Parameters

None

Returns

op::Format (that is, ge::Format), which is an enumeration that contains multiple formats, such as NCHW and ND.

For details about ge::Format, see "ge::Format" in Basic Data Structures and API Reference.

Constraints

None

Examples

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