[PATCH] D75309: [mlir] Add reifyReturnShape to shaped type OpInterface

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 08:42:47 PST 2020


jpienaar marked an inline comment as done.
jpienaar added inline comments.


================
Comment at: mlir/test/lib/TestDialect/TestDialect.cpp:328
   }
-  inferedComponents.reserve(1);
+  inferedReturnShapes.reserve(1);
   auto type = IntegerType::get(17, context);
----------------
pifon2a wrote:
> just out of curiosity: is `reserve()` really needed for 1 element? 
Not really, force of habit :)


================
Comment at: mlir/test/lib/TestDialect/TestDialect.cpp:329
+  inferedReturnShapes.reserve(1);
   auto type = IntegerType::get(17, context);
+  inferedReturnShapes.push_back(ShapedTypeComponents({dim}, type));
----------------
pifon2a wrote:
> why 17?
To make it less likely that it accidentally happened :) No real reasion, completely arbitrary but I was using standard bitwidths as inputs and ensure it does get built.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75309/new/

https://reviews.llvm.org/D75309





More information about the llvm-commits mailing list