Skip to content

Commit a765e09

Browse files
committed
address comment
1 parent 62a7835 commit a765e09

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

mlir/include/mlir/Dialect/Linalg/Passes.td

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def LinalgMorphOpsPass : Pass<"linalg-morph-ops"> {
9494

9595
let description = [{
9696
Convert a linalg op from one representation to another equivalent.
97-
9897
For example, a linalg named op `linalg.add` can also be written as an
9998
category op `linalg.elementwise`, and can also be re-written as
10099
a `linalg.generic`, giving the morphism:
@@ -116,22 +115,16 @@ def LinalgMorphOpsPass : Pass<"linalg-morph-ops"> {
116115
// named-op <--> category <--> generic
117116
Option<"namedToCategory", "named-to-category", "bool", /*default=*/"false",
118117
"convert named ops to category op e.g. `linalg.elementwise`">,
119-
120118
Option<"categoryToGeneric", "category-to-generic", "bool", /*default=*/"false",
121119
"convert category ops e.g. `linalg.elementwise` to `linalg.generic`">,
122-
123120
Option<"namedToGeneric", "named-to-generic", "bool", /*default=*/"false",
124121
"convert named ops e.g. `linalg.add` to `linalg.generic`">,
125-
126122
Option<"genericToCategory", "generic-to-category", "bool", /*default=*/"false",
127123
"convert generic ops to category op e.g. `linalg.contraction`">,
128-
129124
Option<"categoryToNamed", "category-to-named", "bool", /*default=*/"false",
130125
"convert category ops to equivalent named ops">,
131-
132126
Option<"genericToNamed", "generic-to-named", "bool", /*default=*/"false",
133-
"convert linalg.generic to equivalent named ops">
134-
];
127+
"convert linalg.generic to equivalent named ops"> ];
135128
}
136129

137130
def LinalgGeneralizeNamedOpsPass : Pass<"linalg-generalize-named-ops"> {

mlir/lib/Dialect/Linalg/Transforms/NamedToElementwise.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ElementwiseKind getKind(Operation *op) {
4949
.Case([](TanhOp) { return ElementwiseKind::tanh; })
5050
.Case([](ErfOp) { return ElementwiseKind::erf; })
5151
.Default([&](Operation *op) {
52-
assert(false && "unexpected op");
52+
llvm_unreachable("unhandled case in named to elementwise");
5353
return ElementwiseKind::sub;
5454
});
5555
}

0 commit comments

Comments
 (0)