We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

GetRequiredInputShape

Function Description

Obtains the pointer to a required input shape based on the input index in the operator prototype definition.

Function Prototype

Collapse
Word wrap
Dark theme
Copy code
  1. const StorageShape *GetRequiredInputShape(const size_t ir_index) const;

Parameters

Expand
Parameter Input/Output Description
ir_index Input Index of the required input 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, a null pointer is returned.

Restrictions

None

Calling Example

Collapse
Word wrap
Dark theme
Copy code
  1. ge::graphStatus InferShape4ConcatD(TilingContext* context) {
  2. auto in_shape = context->GetRequiredInputShape(0);
  3. // ...
  4. }
Search in Guides
Enter a keyword.