目录

GetOptionalInputShape

Function Description

Obtains the pointer to an optional input shape based on the input index in the operator prototype definition.

Function Prototype

const StorageShape *GetOptionalInputShape(const size_t ir_index) const;

Parameters

Parameter Input/Output Description
ir_index Input Input index in the operator IR prototype definition, 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 ir_index is invalid or the input is not instantiated, a null pointer is returned.

Restrictions

None

Calling Example

ge::graphStatus Tiling4ConcatD(TilingContext* context) {
  const StorageShape *shape_bias = context->GetOptionalInputShape(kBatchMatMulBiasIdx);
  // ...
}