[Mlir-commits] [mlir] [MLIR][XeGPU] Fix isEvenlyDistributable API in xegpu (PR #164907)
Nishant Patel
llvmlistbot at llvm.org
Mon Oct 27 08:13:44 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()) {
----------------
nbpatel wrote:
The comment already says this
"// When round-robin distribution (`rr`) is enabled, `shape[i]` can be
// smaller than `layout[i] * data[i]`, allowing multiple compute units to
// share the data."
https://github.com/llvm/llvm-project/pull/164907
More information about the Mlir-commits
mailing list