[Mlir-commits] [mlir] [MLIR][XeGPU] Remove the transpose attribte from Gather/Scatter ops and Cleanup the documents (PR #145389)
Chao Chen
llvmlistbot at llvm.org
Wed Jun 25 08:23:18 PDT 2025
================
@@ -309,11 +310,23 @@ LogicalResult TensorDescType::verify(
llvm::ArrayRef<int64_t> shape, mlir::Type elementType,
mlir::Attribute encoding, mlir::Attribute layout) {
size_t rank = shape.size();
- // Low-precision types are packed in 32-bit units.
- int32_t packingFactor = 32 / elementType.getIntOrFloatBitWidth();
if (rank != 1 && rank != 2)
return emitError() << "expected 1D or 2D tensor";
+ auto blockAttr = mlir::dyn_cast_if_present<BlockTensorDescAttr>(encoding);
+ if (blockAttr) {
+ MemorySpaceAttr memorySpaceAttr = blockAttr.getMemorySpace();
+ if (rank == 2 && memorySpaceAttr &&
+ memorySpaceAttr.getValue() == MemorySpace::SLM)
+ return emitError() << "SLM is not supported for 2D block tensor";
+ }
+
+ // for gather and scatter ops, Low-precision types are packed in 32-bit units.
+ unsigned bitWidth = elementType.getIntOrFloatBitWidth();
+ int packingFactor =
----------------
chencha3 wrote:
this is because chunk size is limited to 32-bit data type in PVC. so lower precision data will be loaded as 32-bit and then cast to lower precision. this limits the availability of chunk size.
https://github.com/llvm/llvm-project/pull/145389
More information about the Mlir-commits
mailing list