Obtains the corresponding input instantiation information based on the input index in the operator prototype definition.
| Parameter | Input/Output | Description |
|---|---|---|
| ir_index | Input | Input index in the operator IR prototype definition, starting from 0. |
Instantiation information of a specified input.
For details about the definition of AnchorInstanceInfo, see AnchorInstanceInfo.
// Assume that **KernelContext *context** already exists.
auto extend_context = reinterpret_cast<ExtendedKernelContext *>(context);
for (size_t idx = 0; idx < extend_context->GetComputeNodeInfo()->GetIrInputsNum(); ++idx) {
auto input_td = extend_context->GetIrInputInstanceInfo(idx);
// ...
}