GetRequiredInputDataType
Function Usage
Obtains the data type of a required input based on the input index in the operator prototype definition.
Prototype
1 | ge::DataType GetRequiredInputDataType(const size_t ir_index) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Index of the required input in the operator IR prototype definition, starting from 0. |
Returns
Data type of a specified input. If the input ir_index is invalid, DT_UNDEFINED is returned.
Constraints
None
Examples
1 2 3 4 | ge::graphStatus InferDataTypeForXXX(InferDataTypeContext *context) { auto data_type = context->GetRequiredInputDataType(1); ... } |
Parent topic: InferDataTypeContext