I encountered the following error when trying to graph tune the Inception V3 from torchvision:
Traceback (most recent call last):
File "run_pytorch_inception_v3.py", line 28, in <module>
executor.benchmark_layout_transform(min_exec_num=2000)
File "/home/ubuntu/cody-tvm/python/tvm/autotvm/graph_tuner/base_graph_tuner.py", line 434, in benchmark_layout_transform
self._iterate_layout_transform(_fetch_args_callback)
File "/home/ubuntu/cody-tvm/python/tvm/autotvm/graph_tuner/base_graph_tuner.py", line 272, in _iterate_layout_transform
i_topi_op = in_node_entry["topi_op"][0]
KeyError: 'topi_op'
I also tried the Inception V3 model from Gluon CV model zoo as well as other torchvision models but didn’t encounter this issue. I guess it might be due to the torchvision Inception V3 architecture.
You can use the following two files to repeoduce the problem. Note that it may take a while to convert PyTorch Inception V3 to the Relay module.