SetOriginalFormat

Function Usage

Sets the OriginFormat of an aclTensor.

OriginFormat indicates the original format of the aclTensor before it passes through the transdata node (if any).

Prototype

void SetOriginalFormat(op::Format format)

Parameters

Parameter

Input/Output

Description

format

Input

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

Returns

None

Constraints

None

Example

1
2
3
4
// Set the OriginFormat of the input to ND.
void Func(const aclTensor *input) {
    input->SetOriginalFormat(ge::FORMAT_ND);
}