[PATCH] D74532: [mlir] Linalg: Extend promotion to non f32 buffers.
    River Riddle via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb 13 11:19:46 PST 2020
    
    
  
rriddle added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp:136
+    Value fillVal;
+    if (auto t = subView.getType().getElementType().dyn_cast<FloatType>()) {
+      fillVal = folded_std_constant(folder, FloatAttr::get(t, 0.0));
----------------
Remove trivial braces.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp:221
       if (auto sv = dyn_cast_or_null<SubViewOp>(it.getDefiningOp()))
-        subViews.insert(sv);
+        if (sv.getType().getElementType().isa<FloatType>()
+            || sv.getType().getElementType().isa<IntegerType>())
----------------
sv.getType().getElementType().isIntOrFloat()
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74532/new/
https://reviews.llvm.org/D74532
    
    
More information about the llvm-commits
mailing list