I encountered a fatal error when the function get_kernel_metadata executes:
Traceback (most recent call last):
...
File "/home/.pyenv/versions/3.11.9/lib/python3.11/site-packages/torch/_inductor/utils.py", line 597, in get_kernel_metadata
inductor_nodes.sort(
File "/home/.pyenv/versions/3.11.9/lib/python3.11/site-packages/torch/_inductor/utils.py", line 598, in <lambda>
key=lambda n: single_graph._inductor_kernel_metadata_node_to_idx_map[n]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: slice_scatter_default_5
I printed out the graph single_graph whenever it is not None, and I can see that with the same id(single_graph), the single_graph changes during the whole inductor compilation. Yet, the changes are quite minor as only some nodes’ name are modified somehow.
My questions are:
- Is it possible that a node’s name can change during torch.compile? If so, which method or procedure should I look into?
- I’m now using PyTorch 2.6, and I see that the
torch/_inductor/utils.pyfile is not updated wrt thisget_kernel_metadata. Is there any consumption behind this method, or is there any bug?
