IrInstanceNum
Function
Declares the actual number of inputs of each type during instantiation based on the operator IR definition.
Prototype
1 | ContextBuilder &IrInstanceNum(std::vector<uint32_t> instanceNum) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
instanceNum |
Input |
Declares the number of instances according to the input index sequence based on the operator IR prototype definition. |
Returns
Object of the current ContextBuilder
Constraints
This function must be used together with NodeIoNum.
Examples
1 2 3 | context_ascendc::ContextBuilder builder; (void)builder.NodeIoNum(5,3) // The operator has five types of inputs and three types of outputs. .IrInstanceNum({1, 1, 3, 1, 1}); // During operator instantiation, the dynamic input tensor whose index is 2 has three instances. |
Parent topic: ContextBuilder