Using TVM on an Embedded Platform without an OS?


Is there a way to use TVM on an Embedded platform that doesn’t have an OS? The paper mentioned that without RPC it’s a tedious process (which makes sense), but I imagine that’s the only way to do it if you want to use a platform without an OS.


To build baremetal application, the runtime need to be written with hardware specific interfaces (e.g. memory allocation, threading, networking etc.)


What kind of device did you have in mind @KenArrari? It’s doable, but it probably has to be done in an ad-hoc fashion for the platform. The biggest challenge would be to get a substitute for the networking stack - with some sort of serial connection (UART, USB etc.).


Well really, I’m going to run it on a simulator that was made by my group.
It’s a RISC-V ISA. It runs a proxy-kernel on top of that so I think the aspects of networking are taken care of, so does that mean that all I really have to do is compile the runtime and all dependent libraries for RISC-V?


Sorry for thinking out loud, I realized after posting that this makes sense, so I’m just going to post my next step in case anyone is googling the same question.

I was so wrapped up into looking at the targets I over-sought the actual issue.

I’m pretty sure if I was able to compile this with riscv-g++ it would work.

So I’m now going to work on adding a riscv-target to this file.


This is interesting to bring risc-v support for tvm runtime. On the other hand, I think you might need to check out whether all the instructions you need in risc-v are supported in llvm. When the runtime is compiled with riscv-g++, the generated executable should be supported with llvm backend.