[PATCH] D72078: [mlir][Linalg] NFC - Rename LinalgGeneric -> GenericLinalg
Nicolas Vasilache via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 06:19:45 PST 2020
nicolasvasilache created this revision.
Herald added subscribers: llvm-commits, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
nicolasvasilache added a reviewer: ftynse.
ftynse accepted this revision.
This revision is now accepted and ready to land.
This is part of an ongoing cleanup and uniformization work.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72078
Files:
mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
Index: mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
===================================================================
--- mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
+++ mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
@@ -32,7 +32,7 @@
}
}
-Operation *mlir::edsc::makeLinalgGenericOp(
+Operation *mlir::edsc::makeGenericLinalgOp(
ArrayRef<IterType> iteratorTypes, ArrayRef<StructuredIndexed> inputs,
ArrayRef<StructuredIndexed> outputs,
function_ref<void(ArrayRef<BlockArgument>)> regionBuilder,
@@ -118,7 +118,7 @@
ValueHandle a(args[0]);
linalg_yield(unaryOp(a));
};
- return makeLinalgGenericOp(iterTypes, {I}, {O}, fun);
+ return makeGenericLinalgOp(iterTypes, {I}, {O}, fun);
}
Operation *mlir::edsc::ops::linalg_pointwise_tanh(StructuredIndexed I,
@@ -141,7 +141,7 @@
ValueHandle a(args[0]), b(args[1]);
linalg_yield(binaryOp(a, b));
};
- return makeLinalgGenericOp(iterTypes, {I1, I2}, {O}, fun);
+ return makeGenericLinalgOp(iterTypes, {I1, I2}, {O}, fun);
}
Operation *mlir::edsc::ops::linalg_pointwise_add(StructuredIndexed I1,
@@ -170,7 +170,7 @@
AffineExpr m, n, k;
bindDims(ScopedContext::getContext(), m, n, k);
StructuredIndexed A(vA), B(vB), C(vC);
- return makeLinalgGenericOp(
+ return makeGenericLinalgOp(
{IterType::Parallel, IterType::Parallel, IterType::Reduction},
{A({m, k}), B({k, n})},
{C({m, n})},
@@ -198,7 +198,7 @@
unsigned numDims = c.cast<AffineDimExpr>().getPosition() + 1;
StructuredIndexed I(vI), W(vW), O(vO);
// clang-format off
- return makeLinalgGenericOp(
+ return makeGenericLinalgOp(
{par, par, par, par, red, red, red}, {
I({b,
// Roundtrip to flattened form to serve as canonicalization and ensure
@@ -231,7 +231,7 @@
bindDims(ctx, b, dm, c, h, w, kh, kw);
unsigned numDims = kw.cast<AffineDimExpr>().getPosition() + 1;
StructuredIndexed I(vI), W(vW), O(vO);
- return makeLinalgGenericOp(
+ return makeGenericLinalgOp(
{par, par, par, par, par, red, red}, {
I({b,
// Roundtrip to flattened form to serve as canonicalization and ensure
Index: mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
===================================================================
--- mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
+++ mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
@@ -38,12 +38,12 @@
}
/// A StructuredIndexed represents a captured value that can be indexed and
-/// passed to the `makeLinalgGenericOp`. It allows writing intuitive index
+/// passed to the `makeGenericLinalgOp`. It allows writing intuitive index
/// expressions such as:
///
/// ```
/// StructuredIndexed A(vA), B(vB), C(vC);
-/// makeLinalgGenericOp({A({m, n}), B({k, n})}, {C({m, n})}, ... );
+/// makeGenericLinalgOp({A({m, n}), B({k, n})}, {C({m, n})}, ... );
/// ```
struct StructuredIndexed {
StructuredIndexed(Value v) : value(v) {}
@@ -68,7 +68,7 @@
inline void defaultRegionBuilder(ArrayRef<BlockArgument> args) {}
-Operation *makeLinalgGenericOp(
+Operation *makeGenericLinalgOp(
ArrayRef<IterType> iteratorTypes, ArrayRef<StructuredIndexed> inputs,
ArrayRef<StructuredIndexed> outputs,
function_ref<void(ArrayRef<BlockArgument>)> regionBuilder =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72078.235860.patch
Type: text/x-patch
Size: 3260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200102/ed0df1d1/attachment.bin>
More information about the llvm-commits
mailing list