[PATCH] D73944: [mlir][wip] Start Shape dialect

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 18:12:53 PST 2020


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


================
Comment at: mlir/include/mlir/Dialect/CMakeLists.txt:9
 add_subdirectory(SPIRV)
+add_subdirectory(Shape)
 add_subdirectory(StandardOps)
----------------
Seems like this should come before SPIRV?


================
Comment at: mlir/include/mlir/Dialect/Shape/IR/Shape.h:68
+
+class ElementType : public Type::TypeBase<ElementType, Type> {
+public:
----------------
jpienaar wrote:
> rriddle wrote:
> > Can we get comments on each of these types?
> This made me think about having ODS generate these from the description :)
Realistically, we should be able to auto-generate simple types pretty trivially.


================
Comment at: mlir/include/mlir/Dialect/Shape/IR/Shape.h:18
+#include "mlir/IR/Dialect.h"
+#include "mlir/IR/Function.h"
+#include "mlir/IR/FunctionSupport.h"
----------------
Why do you need Function.h here?


================
Comment at: mlir/include/mlir/Dialect/Shape/IR/Shape.h:36
+  Shape,
+  Element,
+  Component,
----------------
Any reason not to sort these?


================
Comment at: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td:151
+
+def Shape_CreateShapeOp : Shape_Op<"create_shape", []> {
+  let summary = "Creates a shape descriptor from a tensor";
----------------
Can we sort these operations alphabetically?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73944





More information about the llvm-commits mailing list