#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/SmallVector.h"
usingnamespacemlir;
usingnamespacemlir::linalg;
namespace {
struct TestLinalgTransforms
: public PassWrapper<TestLinalgTransforms, OperationPass<func::FuncOp>> { … };
}
static void applyPatterns(func::FuncOp funcOp) { … }
static void applyVectorTransferForwardingPatterns(func::FuncOp funcOp) { … }
static void applyLinalgToVectorPatterns(func::FuncOp funcOp) { … }
static void applyGeneralizePadTensorPatterns(func::FuncOp funcOp) { … }
static void applyGeneralizeTensorPackPatterns(func::FuncOp funcOp) { … }
static void applyGeneralizeTensorUnPackPatterns(func::FuncOp funcOp) { … }
static void applyExtractSliceOfPadTensorSwapPattern(func::FuncOp funcOp) { … }
static void applyBubbleUpExtractSliceOpPattern(func::FuncOp funcOp) { … }
static void applySwapExtractSliceWithFillPattern(func::FuncOp funcOp) { … }
static void applyEraseUnusedOperandsAndResultsPatterns(func::FuncOp funcOp) { … }
static void applyEraseUnnecessaryInputs(func::FuncOp funcOp) { … }
static void applyWinogradConv2D(func::FuncOp funcOp) { … }
static void applyDecomposeWinogradOps(func::FuncOp funcOp) { … }
void TestLinalgTransforms::runOnOperation() { … }
namespace mlir {
namespace test {
void registerTestLinalgTransforms() { … }
}
}