hi @cyx thanks for this proposal! I have a couple questions for you on it.
First, could you elaborate a bit more on the use case you have in mind? [quote="cyx, post:1, topic:11816"] allows TVM containers to carry PackedFuncs, [/quote] it seems like this might be one of them. Given we can already pass PackedFunc as arguments to other PackedFunc and return them, it seems like one of the big changes here is making the TVM data structures more expressive. I can certainly think of some good use cases for storing function pointers in a map, but I wonder about passing such a data structure at an API boundary. [quote="cyx, post:1, topic:11816"] ABI stable data structure [/quote] Could you say what you mean/imply by "ABI stable" here? Are you separately compiling a library which needs to invoke PackedFunc? Is there a reason you prefer not to include the PackedFunc library inside that one? (just playing devils' advocate here--iiuc it seems like another solution is to extract `include/tvm/runtime/packed_func.h` into a separate library to make it easy to implement PackedFunc stubs to a separate library) [quote="cyx, post:1, topic:11816"] Instead, the developer-facing class `PackedFunc` remains responsible for creating and managing the object, and for properly setting its content. [/quote] Could you elaborate? Would there be `operator PackedFuncObj`? [quote="cyx, post:1, topic:11816"] ``` class PackedFuncObj : public runtime::Object { using FCallPacked = void(TVMArgs, TVMRetValue*); FCallPacked* f_call_packed_; }; ``` [/quote] Sort of the inverse of my last question--suppose I have e.g. a `Map` whose values are `PackedFuncObj`. How can I invoke the PackedFunc or reconstruct? The function pointer seems to be private in this definition. --- [Visit Topic](https://discuss.tvm.apache.org/t/rfc-runtime-bring-packedfunc-into-tvm-object-system/11816/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/877e3069e160d198b31033aa5334c19e31fd592acccfef704f8708799d408e8d).