GetOptionalInputOffset

Function Usage

Obtains the offset of an optional input tensor based on the input index in the operator prototype definition.

This API is reserved for future use and not supported in the current version.

Prototype

1
int64_t GetOptionalInputOffset(const size_t ir_index) const

Parameters

Parameter

Input/Output

Description

ir_index

Input

Index of the optional input in the operator IR prototype definition, starting from 0.

Returns

Offset of the input tensor for the specified ir_index. When the input ir_index is invalid, the input is not instantiated, or the tensor does not carry discontinuous description information, -1 is returned.

Constraints

None

Examples

1
2
3
4
ge::graphStatus TilingForMul(TilingContext *context) {
  auto option_input_offset_0 = context->GetOptionalInputOffset(0);
  ...
}