How to get names of inputs, outputs and their shapes in tvm::runtime

Hey,

I am trying to implement TVM runtime under simple abstraction layer in C++. All I need right now is the ability to:

  • get input/output count
  • get input/output names
  • get input/output shapes

All tutorials I’ve seen were mostly based of code similar to one here: https://github.com/apache/tvm/blob/main/apps/howto_deploy/cpp_deploy.cc , where only PackedFunc were used for “set_input” or “get_output”. Are there functions for getting some metadata about I/O?

For graph executor, see https://github.com/apache/tvm/blob/main/src/runtime/graph_executor/graph_executor.cc#L517 for list of functions I believe.