Loop#

Loop - 1#

Version

  • name: Loop (GitHub)

  • domain: main

  • since_version: 1

  • function:

  • support_level: SupportType.COMMON

  • shape inference: True

This version of the operator has been available since version 1.

Summary

Attributes

  • body - GRAPH (required) : The graph run each iteration. It has 2+N inputs: (iteration_num, condition, loop carried dependencies…). It has 1+N+K outputs: (condition, loop carried dependencies…, scan_outputs…). Each scan_output is created by concatenating the value of the specified output value at the end of each iteration of the loop. It is an error if the dimensions or data type of these scan_outputs change across loop iterations.

Inputs

Between 3 and 2147483647 inputs.

  • M (optional, heterogeneous) - I:

  • cond (optional, heterogeneous) - B:

  • v_initial (variadic) - V:

Outputs

Between 1 and 2147483647 outputs.

  • v_final_and_scan_outputs (variadic) - V:

Type Constraints

  • V in ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ): All Tensor types

  • I in ( tensor(int64) ): tensor of int64, which should be a scalar.

  • B in ( tensor(bool) ): tensor of bool, which should be a scalar.