diff --git a/mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h b/mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h --- a/mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h +++ b/mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h @@ -37,12 +37,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) {} @@ -67,7 +67,7 @@ inline void defaultRegionBuilder(ArrayRef args) {} -Operation *makeLinalgGenericOp( +Operation *makeGenericLinalgOp( ArrayRef iteratorTypes, ArrayRef inputs, ArrayRef outputs, function_ref)> regionBuilder = diff --git a/mlir/lib/Dialect/Linalg/EDSC/Builders.cpp b/mlir/lib/Dialect/Linalg/EDSC/Builders.cpp --- a/mlir/lib/Dialect/Linalg/EDSC/Builders.cpp +++ b/mlir/lib/Dialect/Linalg/EDSC/Builders.cpp @@ -32,7 +32,7 @@ } } -Operation *mlir::edsc::makeLinalgGenericOp( +Operation *mlir::edsc::makeGenericLinalgOp( ArrayRef iteratorTypes, ArrayRef inputs, ArrayRef outputs, function_ref)> 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().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().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