hi @giuseros,
About the implementation we will have
aot_runtime.h
in a separatesrc/runtime/aot
folder
Would it be possible to create just a library e.g. src/runtime/crt/aot_executor
? This will make things less complicated when the C runtime is distributed with a TVM wheel.
So the short answer is that we don’t have a clear idea yet. But we were hoping to actually develop a pattern to use it, as you suggest. That’s though something I think deserves a separate and more detailed discussion
Okay that seems reasonable. I think there are definitely some good use cases for resource_handle
, but want to make sure the abstraction is at the right level.
Basically we get rid of the system library in c, but not of the dynamic system library in c++ (where it probably is less of an issue). This means this work could possibly be extended to support c++ runtime in the future.
Yeah I think having a few implementation of tir.call_packed
may provide more opportunities for future development. cc @tqchen for more thoughts here.
It would be nice to contemplate how we might be able to keep compatibility with --system-lib
even if it may be overkill in some situations. I think a small C wrapper that effectively implements a tir.call_packed
to instantiate the model could be one way to do this. We also don’t need to settle on this before making a first implementation of AOT in TIR.
Yes, this exactly what I meant. I am looking forward to the RFC!
Great, I’m iterating on this a bit and hope to post it now next week.