[PATCH] D134826: [mlir][MemRef] Simplify extract_strided_metadata(collapse_shape)
    Quentin Colombet via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 28 13:08:33 PDT 2022
    
    
  
qcolombet added inline comments.
================
Comment at: mlir/lib/Dialect/MemRef/Transforms/SimplifyExtractStridedMetadata.cpp:379
+/// MemRef dialect cannot depend on the Affine dialect.
+static SmallVector<OpFoldResult>
+getCollapsedSize(memref::CollapseShapeOp collapseShape, OpBuilder &builder,
----------------
Technically for collapse shape we only return one size/stride per group. However since the overall simplification is handled through templates, we have to stick to the same return type as the expand_shape handling.
We could probably avoid that, but I expect it'll introduce more template boilderplate.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134826/new/
https://reviews.llvm.org/D134826
    
    
More information about the llvm-commits
mailing list