GetDynamicInputStride

Function Usage

Obtains the stride pointer of a dynamic 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
const Stride *GetDynamicInputStride(const size_t ir_index, const size_t relative_index) const

Parameters

Parameter

Input/Output

Description

ir_index

Input

Input index in the operator IR prototype definition, starting from 0.

relative_index

Input

Relative index after the input is instantiated. For example, if three inputs are instantiated for a DYNAMIC_INPUT, the value range of relative_index is [0, 2].

Returns

Stride pointer of the specified input tensor. When ir_index or relative_index is invalid or the tensor does not carry discontinuous description information, a null pointer is returned.

Constraints

None

Examples

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