[Mlir-commits] [mlir] [mlir][xegpu] Patch dynamic descriptor creation (PR #93580)

Artem Kroviakov llvmlistbot at llvm.org
Tue May 28 10:05:03 PDT 2024


https://github.com/akroviakov created https://github.com/llvm/llvm-project/pull/93580

This brief PR fixes the bug in XeGPU's `CreateNdDescOp` tensor creation with dynamic offset and strides.

>From 61d0c773067f07ad2e7def2d374c30ace17126ea Mon Sep 17 00:00:00 2001
From: Artem Kroviakov <artem.kroviakov at intel.com>
Date: Tue, 28 May 2024 09:59:44 -0700
Subject: [PATCH] [mlir][xegpu] Patch dynamic descriptor creation

---
 mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
index 22959224d56c2..37904f55cc23a 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
@@ -110,7 +110,7 @@ void CreateNdDescOp::build(OpBuilder &builder, OperationState &state,
 
   dispatchIndexOpFoldResults(offsets, dynamicOffsets, staticOffsets);
   dispatchIndexOpFoldResults(shape, dynamicShape, staticShape);
-  dispatchIndexOpFoldResults(strides, dynamicStrides, staticOffsets);
+  dispatchIndexOpFoldResults(strides, dynamicStrides, dynamicOffsets);
 
   auto staticOffsetsAttr = builder.getDenseI64ArrayAttr(staticOffsets);
   auto staticShapeAttr = builder.getDenseI64ArrayAttr(staticShape);



More information about the Mlir-commits mailing list