[Mlir-commits] [mlir] d02d9ce - [mlir] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Tue Nov 5 11:03:59 PST 2024


Author: Kazu Hirata
Date: 2024-11-05T11:03:52-08:00
New Revision: d02d9ce314f823181430e9f21c89806f9227c95f

URL: https://github.com/llvm/llvm-project/commit/d02d9ce314f823181430e9f21c89806f9227c95f
DIFF: https://github.com/llvm/llvm-project/commit/d02d9ce314f823181430e9f21c89806f9227c95f.diff

LOG: [mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Tensor/IR/TensorOps.cpp:4781:17: error: unused
  variable 'tileSize' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index 1847066b2d1e36..4249a88627588a 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -4780,6 +4780,7 @@ struct FoldTensorCastPackOp : public OpRewritePattern<PackOp> {
       } else {
         int64_t tileSize = getConstantIntValue(std::get<1>(it)).value();
         assert(tileSize == shape && "tile size and dim size don't match!");
+        (void)tileSize;
         newMixedTileSizes.push_back(
             (rewriter.getIntegerAttr(rewriter.getIndexType(), shape)));
       }


        


More information about the Mlir-commits mailing list