InputTensorsRange

Function Usage

Sets the Range pointer of the input Tensor. During Shape Range inference, the input Tensor Range pointer can be obtained through InferShapeRangeContext constructed using the Builder class. That is, the Tensor with the maximum Shape and the Tensor with the minimum Shape can be obtained.

Prototype

1
OpInferShapeRangeContextBuilder &InputTensorsRange(const std::vector<gert::Range<gert::Tensor> *> &inputs)

Parameters

Parameter

Input/Output

Description

inputs

Input

Array of the gert::Range<gert::Tensor> * type. It stores the Tensor Range pointer of each operator input. Tensor Range contains the tensor of the maximum shape and the tensor of the minimum shape.

Returns

A reference to the OpInferShapeRangeContextBuilder object. It is used for chaining method calls.

Constraints

  • This API must be called before the Build method call. Otherwise, the constructed InferShapeRangeContext will contain undefined data.
  • The caller has the memory ownership of the gert::Tensor * parameter passed in through a pointer. They must ensure that the pointer is valid throughout the lifecycle of the ContextHolder object.