GetDynamicInputFormat
Function Usage
Obtains the pointer to a dynamic input format based on the input index in the operator prototype definition.
Prototype
1 | StorageFormat *GetDynamicInputFormat(const size_t ir_index, const size_t relative_index) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Index in the IR prototype definition. |
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
Input format pointer. If the ir_index or relative_index is invalid, a null pointer is returned.
For details about the definition of the StorageFormat type, see StorageFormat.
Constraints
None
Examples
1 2 3 4 5 | ge::graphStatus InferFormatForXXX(InferFormatContext *context) { const auto format = context->GetDynamicInputFormat(1U, 0U); GE_ASSERT_NOTNULL(format); // ... } |
Parent topic: InferFormatContext