[Mlir-commits] [mlir] [MLIR][XeGPU] Fix isEvenlyDistributable API in xegpu (PR #164907)
Artem Kroviakov
llvmlistbot at llvm.org
Fri Oct 24 09:32:22 PDT 2025
================
@@ -113,9 +113,12 @@ bool XeGPUDialect::isEvenlyDistributable(llvm::ArrayRef<int64_t> shape,
if (layout.size() != shape.size())
return std::nullopt;
auto ratio = computeShapeRatio(shape, layout);
- if (!ratio.has_value())
+ if (ratio.has_value()) {
+ newShape = ratio.value();
+ } else if (!rr || !computeShapeRatio(layout, shape).has_value()) {
----------------
akroviakov wrote:
So the layout and shape are switched here, as opposed to how `ratio` is calculated to allow multiple subgroups to "share" a dimension, instead of distributing it? I suppose the description comment above `tryDistribute` can be updated to explain this.
https://github.com/llvm/llvm-project/pull/164907
More information about the Mlir-commits
mailing list