[MetaSchedule][Ansor] How can I see computation graph after tuning?

Here’s my question. I want to see the computation graph or those fused operators’ TIR after ansor tuning or metaschedule tuning. Do we have any ways to achieve this goal?

mod, params, (input_name, _, _) = relay_workload.get_network(model_name, input_shape) mod.show() def convert_layout(mod):

    seq = tvm.transform.Sequential(

        [relay.transform.ConvertLayout({"nn.conv2d": ["NHWC", "OHWI"]})]

    )

    with tvm.transform.PassContext(opt_level=1):

        mod = seq(mod)

    return mod

mod = convert_layout(mod)
mod.show()

Besides, there is another question. I write this code, and find ‘mod.show()’ gives me the same output. Then how can I get the computation graph after Pass optimization?

1 Like

I want to know too. Please.

1 Like

Typically Ansor and Metaschedule optimise individual kernels, and leave the computation graph itself unchanged.

You can look at the changes made to individual nodes by looking at the schedule generated by tuning. An example of this is shown in the auto-scheduler tutorial, under Using the Record file.

1 Like