Skip to content
Discussion options

You must be logged in to vote

tvm.te.tensor.Tensor是运行时对象,relax.Var是relax IR里的一个节点,并不直接与一个运行时对象绑定。
在MLC中我们处理的都是符号类型对象而非实体的矩阵类,如果C的类型是tvm.te.tensor.Tensor,那意味着我们需要执行C=A*B这一计算才能得到C这个对象,这是pytorch这类深度学习框架中eager模式的思维方式。
MLC执行的流程是:把整个IRModule编译成一个函数,编译出来的函数接收运行时Tensor类型的A和B作为参数,输出计算结果D。
在编译之前,操作的所有对象都是IR里的节点,编译之后我们才会与运行时对象进行交互。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hbsun2113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants