GetDynamicInputTensor
Applicable Products
All processors
Header File/Library File
- Header file: #include <exe_graph/runtime/op_compile_context.h>
- Library file: liblowering.so
Function Usage
Obtains the pointer to the input tensor of the DYNAMIC_INPUT type based on the operator IR prototype definition. The IR prototype index and relative index are required to locate the specific input item after the dynamic input port is instantiated, and are used to process operators with a variable number of inputs.
Prototype
1 | const Tensor *GetDynamicInputTensor(size_t ir_index, size_t relative_index) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Index in the IR prototype definition, identifying the dynamic input port. |
relative_index |
Input |
Relative index, identifying the specific input after dynamic input port is instantiated. |
Returns
Pointer to the input tensor. If an exception occurs, a null pointer is returned.
Restrictions
None
Parent topic: OpCompileContext