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 2022/02/15 19:57:34 UTC

[Apache TVM Discuss] [Questions] Understanding the relationship between microTVM, autoTVM, RPCRunner, rpc_tracker and MicroTVMRpcServerLoop


@fPecc thanks for your questions! Here are some answers.

[quote="fPecc, post:1, topic:12091"]
* AutoTVM running on the host computer
* Multiple boards connected to the same host computer running the AutoTVM schedules.
[/quote]

We've demonstrated the first one, but not the second one yet. It should be possible through Project Options to identify the board serial number you'd like to use for the runner.

[quote="fPecc, post:1, topic:12091"]
Now, each of this boards only runs baremetal applications, so I understand that I should have a simple application running in each of them, using the MicroTVMRPCServer (similar to the [host driven Zephyr example](https://github.com/apache/tvm/tree/main/apps/microtvm/zephyr/template_project/src/host_driven)).
[/quote]

That's correct.

[quote="fPecc, post:1, topic:12091"]
What I am failing to understand is how the tvm.autotvm.RPCRunner and the rpc_tracker integrate with this. All examples I have seen use the RPCRunner to point to an already started rpc_tracker, which should have boards (or hardware) already registered in it.
[/quote]

Great question. At present microTVM uses [AutoTvmModuleLoader](https://github.com/apache/tvm/blob/main/python/tvm/micro/build.py#L113) to override the process of connecting to a *proxy* TVM RPC server (running on a machine connected to the physical hardware) and building/flashing firmware (this is done at the time of module loading rather than in the AutoTVM Builder because most firmware build systems do not like their build artifacts to be moved). 

You can create an RPC tracker and connect several instances of TVM RPC server to that tracker. However, the project options are not currently [customized](https://github.com/apache/tvm/blob/main/python/tvm/micro/build.py#L149) per-RPC-server, so we still have a task to be able to override the serial number via project options to support multiple boards.

[quote="fPecc, post:1, topic:12091"]
1. Are there any examples running AutoTVM on baremetal devices using microTVM? (there is [one](https://tvm.apache.org/docs/how_to/work_with_microtvm/micro_autotune.html#sphx-glr-how-to-work-with-microtvm-micro-autotune-py) for microTVM but it uses the host as target).
[/quote]

You should be able to get it working by substituting a bare metal target for the host one. There is an example there in comments in one of the code snippets (Ctrl+F for Compiling for physical hardware).

[quote="fPecc, post:1, topic:12091"]
Should I write my own runner in order to communicate with my board through the UART? Or should the RPCRunner be able to manage this?
[/quote]

AutoTvmModuleLoader should abstract this away so that you can use RPCRunner. You do need to implement this communication in your microTVM Project API server.

Hope this helps!





---
[Visit Topic](https://discuss.tvm.apache.org/t/understanding-the-relationship-between-microtvm-autotvm-rpcrunner-rpc-tracker-and-microtvmrpcserverloop/12091/2) 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/e99f3b133541cc26b687991343efac44b6392b99a314c2b86c5b6b4b744e3b23).

[Apache TVM Discuss] [Questions] Understanding the relationship between microTVM, autoTVM, RPCRunner, rpc_tracker and MicroTVMRpcServerLoop

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

sorry for the delay here--no, you don't need an RPC tracker. in the future, when we support distributing tuning jobs to more than 1 board, a tracker may be needed functionally, but i suspect we would hide that under the covers.





---
[Visit Topic](https://discuss.tvm.apache.org/t/understanding-the-relationship-between-microtvm-autotvm-rpcrunner-rpc-tracker-and-microtvmrpcserverloop/12091/4) 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/5d79f51766c48a72016c6f07afada2610ad549d41cc0e9d8cb529158bd2f2ae9).

[Apache TVM Discuss] [Questions] Understanding the relationship between microTVM, autoTVM, RPCRunner, rpc_tracker and MicroTVMRpcServerLoop

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

@areusch Thanks for the answer!

So, the AutoTvmModuleLoader eliminates the need to run the rpc_server on the target board, correctly? This would also be impossible because its a baremetal application the one running on the board, so thats ok.

Just to confirm: the rpc_tracker doesn't need to be running in order to tune the tuner.





---
[Visit Topic](https://discuss.tvm.apache.org/t/understanding-the-relationship-between-microtvm-autotvm-rpcrunner-rpc-tracker-and-microtvmrpcserverloop/12091/3) 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/f9ca3c2d26920a89ace18729bed3235b49c269215da5585e7229f46c539bfd92).