SetInstanceStart
Description
Sets the start index of an IR input in the actual inputs of an operator.
Prototype
void SetInstanceStart(const uint32_t instance_start)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
instance_start |
Input |
Index of the first instantiated anchor. |
Returns
None
Restrictions
None
Example
const auto &ir_inputs = node->GetOpDesc()->GetIrInputs(); // All inputs defined by the operator IR
for (size_t i = 0; i < ir_inputs.size(); ++i) {
auto ins_info = compute_node_info.MutableInputInstanceInfo(i); // Obtain the AnchorInstanceInfo object corresponding to the ith IR input.
GE_ASSERT_NOTNULL(ins_info);
size_t input_index = ir_index_to_instance_index_pair_map[i].first; // Obtain the actual input index corresponding to the operator IR input after statistics collection.
ins_info->SetInstanceStart(input_index); // Save the information to the AnchorInstanceInfo object corresponding to the IR input.
}
Parent topic: AnchorInstanceInfo