[Relay]Generate a graph from Relay IR

Hi there, I am trying to use TVM to compile high level code using a Deep Learning library for a custom accelerator that I am trying to build. My goal currently is, given Relay IR, I would like to generate a graph, containing the various relay ops and their attributes as nodes, (attributes like stride and padding in the case of nn.conv2d), and the edges as variables that are inputs and outputs to these ops. So that I can traverse this graph to generate sequential compiled code(I have low level compiled code for each op in relay). Any leads on how to do this would be really helpful. Thanks!

I also have the same question. I would like to generate a compute graph from Relay IR which has finished Graph optimization or quantization. Furthermore, I would like to convert the graph to onnx format. Do you have any idea now?