Overview
This class is used to describe the relationship between the inputs of the IR definition prototype of an operator and the actual inputs. Each AnchorInstanceInfo object corresponds to an IR input and records two pieces of information: instantiation_num_ and instance_start_. instantiation_num_ describes the actual number of inputs corresponding to an IR input, and instance_start_ describes the start index of an IR input in the actual inputs. The current IR definition provides three types of inputs: required inputs, optional inputs, and dynamic inputs. For details, see the following table.
Input Type |
instantiation_num_ |
instance_start_ |
|---|---|---|
Required input |
The value must be 1. Otherwise, an error is reported. |
The value starts from 0. Formula: instance_start_[i] = instance_start_[i-1] + instantiation_num_[i-1] |
Optional input |
If there is an actual input, the value is 1. Otherwise, the value is 0. |
|
Dynamic input |
The value is 0 to N based on the actual number of inputs. |