Open Jokeren opened 1 year ago
@llvm/issue-subscribers-mlir
Are you sending a patch? (since you found the issue) or do you want me to land this for you?
I'm not familiar with the patching process yet. Maybe I'll check tomorrow to see if I could submit a patch with a test included for this issue. If not, I'll seek help from your side. Many thanks!
Our solution: https://github.com/openai/triton/blob/ccd17d6bf9da4975b15442b0de879594301062b5/lib/Analysis/Utility.cpp#L232
Will try to prepare a patch
The TopologicalSort implementation adds every node it sees into the queue without filtering those have been visited. Therefore, the searching space grows rapidly, and immediately the size of the queue explodes.
TopologicalSort
Adding a single line can resolve the problem:
cc @ptillet, @ngimel
Tested with llvm-15.0.6
Reproduced with:
test.mlir
: