[Mlir-commits] [mlir] [XeGPU] Add sg_map for scatter verification (PR #124300)

Adam Siemieniuk llvmlistbot at llvm.org
Mon Jan 27 06:54:25 PST 2025


================
@@ -551,10 +568,27 @@ LogicalResult StoreScatterOp::verify() {
 
   if (tdescTy.getRank() == 2) {
     if (!getTransposeAttr())
-      return emitOpError("load_gather has to be transposed.");
+      return emitOpError("Store op has to be transposed.");
     transpose({1, 0}, tdescShape);
   }
 
+  if (auto sgMap = tdescTy.getSGMapAttr()) {
+    auto valueVecTy = cast<VectorType>(valueTy);
+    const int32_t wiData =
+        sgMap.getWiData()[0] > 1 ? sgMap.getWiData()[0] : sgMap.getWiData()[1];
+    if (valueVecTy.getRank() != 1)
+      return emitOpError("Store in SIMT should return a 1D vector.");
----------------
adam-smnk wrote:

nit: phrasing, sth along `can accept only a 1D` as it's a store

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


More information about the Mlir-commits mailing list