[Mlir-commits] [mlir] [MLIR][XEGPU] Add blocking support for scatter ops (PR #144766)
Jianhui Li
llvmlistbot at llvm.org
Wed Jun 18 14:15:38 PDT 2025
================
@@ -295,12 +297,39 @@ void XeGPUBlockingPass::runOnOperation() {
Type elemTy = type.getElementType();
Type newTy;
- if (auto tdescTy = dyn_cast<xegpu::TensorDescType>(type))
- newTy = xegpu::TensorDescType::get(
- ctx, tileShape, elemTy, tdescTy.getEncoding(),
- tdescTy.getLayoutAttr().dropInstData());
- else
+ if (auto tdescTy = dyn_cast<xegpu::TensorDescType>(type)) {
+
+ Attribute encoding = tdescTy.getEncoding();
+ // If the encoding is a ScatterTensorDescAttr, we need to
+ // potentially adjust the chunk size based on the inst_data.
+ if (tdescTy.isScattered()) {
+ auto scatterAttr = tdescTy.getEncodingAsScatterTensorDescAttr();
+ // mlir::dyn_cast<xegpu::ScatterTensorDescAttr>(encoding);
----------------
Jianhui-Li wrote:
Change back using "dyn_cast_if_present"
https://github.com/llvm/llvm-project/pull/144766
More information about the Mlir-commits
mailing list