Skip to content

Commit f8766e0

Browse files
committed
address the sanitizer complain
1 parent 4862f2a commit f8766e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc,
840840
SmallVector<int64_t> matrixShape(getShape().begin(), getShape().end());
841841
SmallVector<int64_t> blockShape = getBlockShape();
842842
SmallVector<int64_t> strides = getStrideShape();
843+
SmallVector<OpFoldResult> blockedOffsets;
843844

844845
// blockshape equal to matrixshape means no blocking
845846
if (llvm::equal(blockShape, matrixShape)) {
@@ -850,7 +851,7 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc,
850851
"offsets and blockShape must have the same size");
851852
// say the original offset is [y, x], and the block shape is [By, Bx],
852853
// then the blocked offset is [y/By, x/Bx, y%By, x%Bx]
853-
SmallVector<OpFoldResult> blockedOffsets;
854+
854855
SmallVector<OpFoldResult> divs, rems;
855856

856857
for (auto [offset, block] : llvm::zip(offsets, blockShape)) {
@@ -859,7 +860,6 @@ Value MemDescType::getLinearOffsets(OpBuilder &builder, Location loc,
859860
}
860861
blockedOffsets.append(divs.begin(), divs.end());
861862
blockedOffsets.append(rems.begin(), rems.end());
862-
863863
offsets = blockedOffsets;
864864
}
865865

0 commit comments

Comments
 (0)