You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section taken from the original hugr specification as part of #744:
Higher-order (Tierkreis) Extension
In some contexts, notably the Tierkreis runtime, higher-order
operations allow graphs to be valid dataflow values, and be executed.
These operations allow this.
CallIndirect: Call a function indirectly. Like Call, but the
first input is a standard dataflow function type. This is essentially eval in Tierkreis.
catch: like CallIndirect, the first argument is of type Function[R]<I,O> and the rest of the arguments are of type I.
However the result is not O but Sum(O,ErrorType)
parallel, sequence, partial? Note that these could be executed
in first order graphs as straightforward (albeit expensive)
manipulations of Graph structs/protobufs!
loop - In order to run the body graph, we need the extensions
R that the graph requires, so
calling the loop function requires those same extensions. Since the
result of the body is fed into the input of the graph, it needs to have
the same extension requirements on its inputs and outputs. We require
that v is lifted to have extension requirement
R so that it matches the type
of input to the next iterations of the loop.
load_const - For operations which instantiate a graph (load_const
and Call) the functions are given an extra parameter at graph
construction time which corresponds to the function type that they are
meant to instantiate. This type will be given by a typeless edge from
the graph in question to the operation, with the graph’s type added as
an edge weight.
The text was updated successfully, but these errors were encountered:
The section taken from the original hugr specification as part of #744:
Higher-order (Tierkreis) Extension
In some contexts, notably the Tierkreis runtime, higher-order
operations allow graphs to be valid dataflow values, and be executed.
These operations allow this.
CallIndirect
: Call a function indirectly. LikeCall
, but thefirst input is a standard dataflow function type. This is essentially
eval
in Tierkreis.catch
: likeCallIndirect
, the first argument is of typeFunction[R]<I,O>
and the rest of the arguments are of typeI
.However the result is not
O
butSum(O,ErrorType)
parallel
,sequence
,partial
? Note that these could be executedin first order graphs as straightforward (albeit expensive)
manipulations of Graph
struct
s/protobufs!loop - In order to run the body graph, we need the extensions
R that the graph requires, so
calling the loop function requires those same extensions. Since the
result of the body is fed into the input of the graph, it needs to have
the same extension requirements on its inputs and outputs. We require
that v is lifted to have extension requirement
R so that it matches the type
of input to the next iterations of the loop.
CallIndirect - This has the same feature as loop: running a
graph requires its extensions.
load_const - For operations which instantiate a graph (load_const
and Call) the functions are given an extra parameter at graph
construction time which corresponds to the function type that they are
meant to instantiate. This type will be given by a typeless edge from
the graph in question to the operation, with the graph’s type added as
an edge weight.
The text was updated successfully, but these errors were encountered: