IOInstanceNum

Function Usage

When the number of input IR prototype instances is not 1 (generally in the optional or dynamic input scenario), you need to set the number of instances of each input IR prototype of the operator to build ComputeNodeInfo in the base class ExtendedKernelContext of each subclass Context.

Prototype

1
T &IOInstanceNum(const std::vector<uint32_t> &input_instance_num, const std::vector<uint32_t> &output_instance_num)

Parameters

Parameter

Input/Output

Description

input_instance_num

Input

Vector array input. The size of the vector indicates the number of operator prototype inputs, and the number at each position in the vector array indicates the number of input instances of each IR prototype.

output_instance_num

Input

Vector array input. The size of the vector indicates the number of operator prototype outputs, and the number at each position in the vector array indicates the number of output instances of each IR prototype.

Returns

A reference to the subclass object of type T. It is used for subclass chain calls.

Constraints

This API is mutually exclusive to IONum. Only one of the two APIs needs to be called. The API that is called first prevails.