From dbb4858a8c0cd883ff4e4d5df20152c4b295b909 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 5 Nov 2024 09:53:44 -0800 Subject: [PATCH] [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] --- mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp index 8f72e816ea42d1..58841f29698e0d 100644 --- a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp +++ b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @@ -137,6 +137,7 @@ static Value staticallyExtractSubvector(OpBuilder &rewriter, Location loc, auto vectorType = cast(source.getType()); assert((vectorType.getRank() == 1 && extractType.getRank() == 1) && "expected 1-D source and destination types"); + (void)vectorType; auto offsets = rewriter.getI64ArrayAttr({frontOffset}); auto sizes = rewriter.getI64ArrayAttr({subvecSize}); auto strides = rewriter.getI64ArrayAttr({1}); @@ -155,6 +156,8 @@ static Value staticallyInsertSubvector(OpBuilder &rewriter, Location loc, auto destType = cast(dest.getType()); assert(srcType.getRank() == 1 && destType.getRank() == 1 && "expected source and dest to be vector type"); + (void)srcType; + (void)destType; auto offsets = rewriter.getI64ArrayAttr({offset}); auto strides = rewriter.getI64ArrayAttr({1}); return rewriter.create(loc, dest.getType(), src,