What is the difference between tvm.var and tvm.relay.var?


#1

Hello,

I’m a bit confused at tvm.var and tvm.relay.var. What’s major difference between these two data types? Current document is not very clear about this

Haichen


#2

tvm.var produces a HalideIR variable while tvm.relay.var produces a Relay IR variable, so you use each one depending on what graph/ast you’re trying to construct. Halide and Relay nodes can’t be mixed.


#3

Hi Joshpoll,
Can I say Relay IR is graph level IR, and Relay IR is converted into HalideIR by lowering ?
Thank you in advacne.


#4

Yes, you’re correct.