[Mlir-commits] [mlir] [MLIR][XeGPU] Extend SGMapAttr and Add ConvertLayoutOp (PR #132425)

Chao Chen llvmlistbot at llvm.org
Fri Apr 4 07:42:09 PDT 2025


================
@@ -105,6 +105,28 @@ isArgShapesValid(TensorDescType tdescTy, VectorType valueTy,
                    << " for tensor descriptor " << tdescTy;
 }
 
+static bool isEvenDistributed(llvm::ArrayRef<int64_t> shape,
+                              xegpu::LayoutAttr attr) {
+  assert(attr && "Layout attribute is missing.");
+  llvm::SmallVector<int32_t> defaults(shape.size(), 1);
+  llvm::ArrayRef<int32_t> layout, data;
+  if (auto sg_layout = attr.getSgLayout()) {
----------------
chencha3 wrote:

Yes, you are right.

https://github.com/llvm/llvm-project/pull/132425


More information about the Mlir-commits mailing list