[Mlir-commits] [mlir] [mlir][tensor] Rewrite tensor.pack as a	constant (PR #93954)
    llvmlistbot at llvm.org 
    llvmlistbot at llvm.org
       
    Mon Jun  3 09:32:23 PDT 2024
    
    
  
================
@@ -45,9 +48,159 @@ struct GenerateToConstant : public OpRewritePattern<GenerateOp> {
   }
 };
 
+/// Rewrite tensor.pack with arith.constant if the pack is writing
+/// to an empty tensor and the destination shape is static.
+struct PackToConstant : OpRewritePattern<tensor::PackOp> {
----------------
MaheshRavishankar wrote:
Isnt the expectation that these patterns come with a way to control when these patterns get applied?
https://github.com/llvm/llvm-project/pull/93954
    
    
More information about the Mlir-commits
mailing list