Question about dataflow node in ExpandDataflow

I found that in the ExpandDataflow(https://github.com/apache/tvm/blob/main/include/tvm/relay/expr_functor.h#L440) , the Call, Tuple, TupleGetItem are categorized as dataflow node. Can someone tell me why?

I think it might because in Relay programs, Call, Tuple, and TupleGetItem are used to be “binded” to left values.

  • v0 = op(...)
  • v1 = tuple(x0, x1)
  • v10 = GetTupleItem(v1, 0)
1 Like

Hi @ganler

Thanks a lot!It doesn’t make sense maybe. But the first one should be a Call Node, right?

  • v0 = Call(op, arg0, arg1, ...)

But you can also bind value such as

  • v1 = Const(1)
  • v2 = Var(...)

I can’t see the difference between them with your examples.

But the first one should be a Call Node, right?

Yes.

But you can also bind value such as

Var and Const are leaf nodes that do not need to be “expanded”.

1 Like

Hi, @ganler , thanks for your answer.

I also wonder, why Function Node or Let Node will not be “expanded” since they also act like “binding parameters”?

I think we don’t have ... = Function or ... = Let in Relay and you will expand the Function in CallNode.