[Mlir-commits] [mlir] [MLIR][XeGPU] Add sg_map for scatter verification (PR #124300)
Jianhui Li
llvmlistbot at llvm.org
Thu Jan 30 08:43:45 PST 2025
================
@@ -453,7 +453,16 @@ LogicalResult CreateDescOp::verify() {
if (shape != tdescShape)
return emitOpError("Incorrect TensorDesc shape. ")
<< "Expected is " << makeString(shape) << "\n";
-
+ if (auto sgMap = tdescTy.getSGMapAttr()) {
+ if (sgMap.getWiData()[0] > 1)
+ return emitOpError("TensorDesc cannot have wi_data[0] > 1.");
+ if (chunkSize != static_cast<int>(sgMap.getWiData()[1]))
+ return emitOpError("TensorDesc's chunkSize must match wi_data[1].");
+ if (int rank = tdescTy.getRank(); (sgMap.getWiLayout()[2 - rank] == 1))
----------------
Jianhui-Li wrote:
> @Jianhui-Li Can't I have still 2D load with inner dimension 1 ? That is, `chunk_size = 1` and `wi_data = [1, 1]`
User can't do so. This representation adds more complexity to the XeGPU implementation. And we don't expect user really want to do this - user should just use regular load.
https://github.com/llvm/llvm-project/pull/124300
More information about the Mlir-commits
mailing list