[Mlir-commits] [mlir] [MLIR][Linalg] Add specialization for linalg.broadcast (PR #104684)
Javed Absar
llvmlistbot at llvm.org
Sat Aug 17 15:13:40 PDT 2024
================
@@ -22,13 +22,32 @@
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include <algorithm>
+#include <numeric>
using namespace mlir;
using namespace mlir::linalg;
/// Include the definitions of the copy operation interface.
#include "mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc"
+namespace {
+/// Check linalg generic with single input output has
+/// body that is just a yield op yielding input value.
+static bool bodyIsJustYieldOp(GenericOp genericOp) {
----------------
javedabsar1 wrote:
> Could you perhaps use this mechanism instead? https://github.com/plaidml/tpp-mlir/blob/main/include/TPP/IR/StructuredOpMatcher.h
>
> We can create a PR to upstream this part, so that we can all use it.
@rengolin please could you elaborate what exactly you mean ? TPP i am not so familiar with and its outside mlir-core.
https://github.com/llvm/llvm-project/pull/104684
More information about the Mlir-commits
mailing list