You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Andrew Reusch via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/12/07 00:10:11 UTC

[Apache TVM Discuss] [microTVM] Several questions about micro TVM


[quote="sho, post:5, topic:11569"]
So the Graph Runtime works on top of C Runtime? Could you please tell me where the C Runtime actually is? I found the link below but it seems that graph_executor is written in C++.
[/quote]

There are actually two GraphExecutor implementations in TVM: [one](https://github.com/apache/tvm/blob/main/src/runtime/graph_executor/graph_executor.cc) for the C++ Runtime and [one](https://github.com/apache/tvm/blob/main/src/runtime/crt/graph_executor/graph_executor.c) for the C Runtime. Sorry for this confusion.

[quote="sho, post:5, topic:11569"]
I understood that the key difference is micro TVM uses C runtime and micro TVM uses C++ runtime, and the latter may not work on MCUs for the moment.
[/quote]

could you clarify this sentence? I think you meant to say something different in the second "micro TVM."

[quote="sho, post:5, topic:11569"]
AOT Executor is the C code that can be downloaded onto MCUs?
[/quote]

Yes.

[quote="sho, post:5, topic:11569"]
I’d like to know what capabilities you are adding to AOT.
[/quote]

We'll be releasing some roadmaps for microTVM and TVM as a whole ~next month.

[quote="sho, post:5, topic:11569"]
Also, I’m curious about how you can execute GraphExecutor + GraphJSON on MCUs for the moment. I know it’s difficult for MCUs due to memory constraints, but I’d like to see how you deploy standalone GraphExecutor + GraphJSON to run inference on MCUs without communicating with the host PC. Should I be able to see it in the tutorial below?
[/quote]

Yes, the microtvm-blogpost-eval does explain the approach, but unfortunately it's a bit out of date. We should have a new tutorial at some point soon that uses Project API. I'd also suggest you look for the Arduino tutorial coming up at TVMCon. Apologies for lacking documentation here.





---
[Visit Topic](https://discuss.tvm.apache.org/t/several-questions-about-micro-tvm/11569/6) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/e943810b9b9b6b14809671bb7a72ab62c565c5c878adf0669cd92a62a6e7d823).

[Apache TVM Discuss] [microTVM] Several questions about micro TVM

Posted by Andrew Reusch via Apache TVM Discuss <no...@discuss.tvm.ai>.

Sorry for the long delay!

[quote="sho, post:7, topic:11569"]
[quote="areusch, post:6, topic:11569"]
There are actually two GraphExecutor implementations in TVM: [one ](https://github.com/apache/tvm/blob/main/src/runtime/graph_executor/graph_executor.cc) for the C++ Runtime and [one ](https://github.com/apache/tvm/blob/main/src/runtime/crt/graph_executor/graph_executor.c) for the C Runtime. Sorry for this confusion.
[/quote]

Oh, ok. I should have noticed that GraphExecutor written in C is in crt. Looking though the contents of tvm/src/runtime/crt, I can create a C project on IDE with the source code here and the outputs from tvm.relay.build + SoC(or MCU) initialization code right?
[/quote]

Yeah the embedding of CRT can be a little confusing. We should probably think about whether we should reorganize src/runtime at some point. Yes, you should be able to create a C project in your IDE as you described.

[quote="sho, post:7, topic:11569"]
But this might not always be the case since as for Host-driven execution, which requires rpc server/client communication, the scripts for this are in ... and they are written in C++ right?
[/quote]

Yeah you're right here. We need to do a rewrite there into C, but we need to invest more heavily in C-based RPC unit testing first.





---
[Visit Topic](https://discuss.tvm.apache.org/t/several-questions-about-micro-tvm/11569/8) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/5f2ac53760a83f8bcd5fb00b3cd7d0b0bf0e596f17d273100ab8a1905903e229).

[Apache TVM Discuss] [microTVM] Several questions about micro TVM

Posted by sho via Apache TVM Discuss <no...@discuss.tvm.ai>.

Thank you very much for your answers.

[quote="areusch, post:6, topic:11569"]
There are actually two GraphExecutor implementations in TVM: [one ](https://github.com/apache/tvm/blob/main/src/runtime/graph_executor/graph_executor.cc) for the C++ Runtime and [one ](https://github.com/apache/tvm/blob/main/src/runtime/crt/graph_executor/graph_executor.c) for the C Runtime. Sorry for this confusion.
[/quote]

Oh, ok. I should have noticed that GraphExecutor written in C is in crt. Looking though the contents of tvm/src/runtime/crt, I can create a C project on IDE with the source code here and the outputs from tvm.relay.build + SoC(or MCU) initialization code right?

[quote="areusch, post:6, topic:11569"]
could you clarify this sentence? I think you meant to say something different in the second “micro TVM.”
[/quote]

Apologies for my mistakes and confusing you. I wanted to say

"I understood that the key difference is micro TVM uses C runtime and TVM uses C++ runtime, and the latter may not work on MCUs for the moment."

But this might not always be the case since as for Host-driven execution, which requires rpc server/client communication, the scripts for this are in 

https://github.com/apache/tvm/tree/main/src/runtime/rpc
https://github.com/apache/tvm/tree/main/src/runtime/crt/microtvm_rpc_common
https://github.com/apache/tvm/tree/main/src/runtime/crt/microtvm_rpc_server

and they are written in C++ right?

I think before I dive into micro TVM, I should begin with TVM so that I will have clear understanding of the difference between TVM and micro TVM.

[quote="areusch, post:6, topic:11569"]
We’ll be releasing some roadmaps for microTVM and TVM as a whole ~next month.
[/quote]

Thank you for your release information. I'm looking forward to its release.

[quote="areusch, post:6, topic:11569"]
Yes, the microtvm-blogpost-eval does explain the approach, but unfortunately it’s a bit out of date. We should have a new tutorial at some point soon that uses Project API. I’d also suggest you look for the Arduino tutorial coming up at TVMCon. Apologies for lacking documentation here.
[/quote]

Ok, that's fine as long as it works anyway. Also I'll try to run the Arduino tutorial when it's published. Thank you for your suggestion.





---
[Visit Topic](https://discuss.tvm.apache.org/t/several-questions-about-micro-tvm/11569/7) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/cd32ac257e4936b19404ad97c631afcdc2463496989062250bd77a8cfe1998c2).