MLIR  19.0.0git
TensorToLinalg.cpp
Go to the documentation of this file.
1 //===- TensorToLinalg.cpp - Tensor to Linalg Patterns ---------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements patterns to convert Tensor dialect to Linalg dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
16 #include "mlir/IR/AffineMap.h"
18 #include "llvm/Support/Debug.h"
19 
20 #define DEBUG_TYPE "tensor-to-linalg-pattern"
21 
22 using namespace mlir;
23 
24 //===----------------------------------------------------------------------===//
25 // Pattern population
26 //===----------------------------------------------------------------------===//
27 
30 }
MLIRContext * getContext() const
Definition: PatternMatch.h:812
RewritePatternSet & add(ConstructorArg &&arg, ConstructorArgs &&...args)
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
Definition: PatternMatch.h:836
Include the generated interface declarations.
void populateTensorToLinalgPatterns(RewritePatternSet &patterns)
Appends to a pattern list additional patterns for translating tensor ops to Linalg ops.
Rewrite a tensor::PadOp into a sequence of EmptyOp, FillOp and InsertSliceOp.
Definition: Transforms.h:1344