目录

GetInputShape

Function Description

Obtains the pointer to an input shape based on the operator input index. The input index refers to the actual index after operator instantiation, not the index in the prototype definition.

Function Prototype

const StorageShape *GetInputShape(const size_t index) const;

Parameters

Parameter Input/Output Description
index Input Operator input index, starting from 0.

Return Value

Pointer to the specified input shape. The input shape contains the original shape and storage shape information. For details about the definition of the StorageShape type, see StorageShape.

If the input index is invalid, a null pointer is returned.

Restrictions

None

Calling Example

ge::graphStatus TilingForMul(TilingContext *context) {
  auto input_shape_0 = *context->GetInputShape(0);
  auto input_shape_1 = *context->GetInputShape(1);
  auto output_shape = context->GetOutputShape(0);
  // ...
}