Ah gotcha. I think there's one thing there I'm not sure how to solve in a good 
way: TVM generates TVMBackendPackedCFunc from llvm and c codegens. Because 
TVMFuncCall RPC call accepts a function handle, we have to provide something 
there that contains enough data to differentiate between TVMBackendPackedCFunc 
and PackedFunc. The C++ runtime does this with LibraryModule, which creates a 
closure. I would say on the embedded side, we should avoid this strategy, since 
that requires some type of dynamic memory allocation.

We could store some module- or function-level bits to differentiate, but then 
that's also more RAM. I had some discussions with @tqchen about unifying the 
runtime impls--maybe he can weigh in on this? It seems like we could just unify 
the runtime impls, and make TVMBackendPackedCFunc the cross-runtime standard 
(even if we modify its signature). Then runtimes would only need to know how to 
call that one type of function.





---
[Visit 
Topic](https://discuss.tvm.ai/t/rfc-misra-c-changes-for-rpc-support/7098/6) to 
respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/deaad5fe1f4751a3b8a48490721acfa1ea0990cd6a97b88ef8565406462a01f9).

Reply via email to