[pre-RFC] TVMC: Add support for microTVM targets

@mehrdadh Thanks a lot for the review!

  • considering the flow of using tvmc for micro, I find it’s a little bit confusing to switch between tvmc and tvmc micro back and forth. My suggestion is, if possible, to have all tasks for microTVM tvmc to live under tvmc micro including [tvmc micro compile, tvmc micro run, etc] and then reuse tvmc interface in the backend. This will also resolve the drawback that you mentioned, because you can limit arguments for tvmc micro run and pass it to tvmc run.

As a general “rule” I’ve tried to stick with not duplicating existing commands when adding the new micro context.

Regarding the compile command, besides avoiding duplicated commands the reasons to separate it from micro build and not creating a compile command inside the “micro” context are also along the lines of what was previously discussed with @leandron , @manupa-arm , and @areusch in [0] – comment #7 I think it’s being working fine that split so far.

Regarding the run command, although creating a micro run would avoid the drawback mentioned it would also duplicate all the options that are common to the non-micro targets inside micro run. Also the more we go this way the more tvmc micro will look like “a tvmc (micro) inside tvmc”, like an whole new tool for micro targets only. So there are caveats with that approach too. But I’m happy to debate more about it.

I think this is a great idea for next version. I suggest that we keep compile option, but change create-project to compile and create the project.

If the compile command you mention here is the one that already exists (i.e. tvmc compile) I agreed! tvmc micro create-project can perfectly accommodate your suggestion - compile and create the project, yep.

1 Like