diff options
| author | Jianhui Li <jian.hui.li@intel.com> | 2025-10-16 18:46:57 +0000 |
|---|---|---|
| committer | Jianhui Li <jian.hui.li@intel.com> | 2025-10-16 18:46:57 +0000 |
| commit | f8766e06d2ca2894671006267dd0417dfedfec6a (patch) | |
| tree | 69bdb77c3f7004aead262d8a0ac6f4fd37f4dc66 | |
| parent | 4862f2a486a92fb561b3179fb9d9420602a6738f (diff) | |
address the sanitizer complainusers/Jianhui-Li/XeGPU/load-matrix-WI-attributes
| -rw-r--r-- | mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp index 1cfae28f3118..1599ae9f28e9 100644 --- a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp +++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp @@ -840,6 +840,7 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc, SmallVector<int64_t> matrixShape(getShape().begin(), getShape().end()); SmallVector<int64_t> blockShape = getBlockShape(); SmallVector<int64_t> strides = getStrideShape(); + SmallVector<OpFoldResult> blockedOffsets; // blockshape equal to matrixshape means no blocking if (llvm::equal(blockShape, matrixShape)) { @@ -850,7 +851,7 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc, "offsets and blockShape must have the same size"); // say the original offset is [y, x], and the block shape is [By, Bx], // then the blocked offset is [y/By, x/Bx, y%By, x%Bx] - SmallVector<OpFoldResult> blockedOffsets; + SmallVector<OpFoldResult> divs, rems; for (auto [offset, block] : llvm::zip(offsets, blockShape)) { @@ -859,7 +860,6 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc, } blockedOffsets.append(divs.begin(), divs.end()); blockedOffsets.append(rems.begin(), rems.end()); - offsets = blockedOffsets; } |
