[Mlir-commits] [mlir] [mlir][xegpu] Fix operand layouts when rematerializing on layout conflict (PR #224730)
Charitha Saumya
llvmlistbot at llvm.org
Tue Oct 6 15:48:06 PDT 2026
charithaintc wrote:
I had a discussion with Jianhui to understand the issue better. While I am not against the current approach I think this can be handled more gracefully.
Summarizing my thinking.
1. The issue arise because when trying to fix a given a conflict, a new conflict is added to the IR due to naive cloning.
2. I think we should stick to current way of "fixing one conflict at a time" approach and not focusing on fixing the whole chain if (1) arise.
3. (1) should be treated as a new conflict and treated as any other. if that is not caught in current walk (most conflicts will be resolved in single walk) it will be caught in next fixed point iteration.
4. I think of "cloning" to avoid conflicts for vector ops as an advanced optimization. This should be decoupled from layout conflict resolution. for example this type of cloning can be build into convert_layout's folder, so when you try to create a new conv_layout it will automatically do the desired "cloning" all by itself. But important point is separating concerns.
I did not dig deep into the code to check if above can be implemented easily. so take the suggestions with a grain of salt.
https://github.com/llvm/llvm-project/pull/224730
More information about the Mlir-commits
mailing list