Obtains the corresponding output instantiation information based on the output index in the operator prototype definition.
| Parameter | Input/Output | Description |
|---|---|---|
| ir_index | Input | Output index in the operator IR prototype definition, starting from 0. |
Instantiation information of a specified output.
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()->GetOutputsNum(); ++idx) {
auto output_td = extend_context->GetIrOutputInstanceInfo(idx);
// ...
}