Skip to content

Commit dbb4858

Browse files
[mlir] Fix warnings
This patch fixes: mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:137:8: error: unused variable 'vectorType' [-Werror,-Wunused-variable] mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:154:8: error: unused variable 'srcType' [-Werror,-Wunused-variable] mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:155:8: error: unused variable 'destType' [-Werror,-Wunused-variable]
1 parent c822135 commit dbb4858

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ static Value staticallyExtractSubvector(OpBuilder &rewriter, Location loc,
137137
auto vectorType = cast<VectorType>(source.getType());
138138
assert((vectorType.getRank() == 1 && extractType.getRank() == 1) &&
139139
"expected 1-D source and destination types");
140+
(void)vectorType;
140141
auto offsets = rewriter.getI64ArrayAttr({frontOffset});
141142
auto sizes = rewriter.getI64ArrayAttr({subvecSize});
142143
auto strides = rewriter.getI64ArrayAttr({1});
@@ -155,6 +156,8 @@ static Value staticallyInsertSubvector(OpBuilder &rewriter, Location loc,
155156
auto destType = cast<VectorType>(dest.getType());
156157
assert(srcType.getRank() == 1 && destType.getRank() == 1 &&
157158
"expected source and dest to be vector type");
159+
(void)srcType;
160+
(void)destType;
158161
auto offsets = rewriter.getI64ArrayAttr({offset});
159162
auto strides = rewriter.getI64ArrayAttr({1});
160163
return rewriter.create<vector::InsertStridedSliceOp>(loc, dest.getType(), src,

0 commit comments

Comments
 (0)