MLIR
21.0.0git
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
a
c
f
h
i
k
m
n
o
p
r
s
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
f
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
_
a
b
c
d
e
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
m
n
o
r
s
t
u
v
y
Enumerations
Enumerator
a
b
c
e
f
g
i
m
n
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
z
lib
Conversion
TensorToLinalg
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
13
#include "
mlir/Conversion/TensorToLinalg/TensorToLinalg.h
"
14
#include "
mlir/Dialect/Linalg/Transforms/Transforms.h
"
15
#include "
mlir/Dialect/Tensor/IR/Tensor.h
"
16
#include "
mlir/IR/AffineMap.h
"
17
#include "llvm/Support/Debug.h"
18
19
#define DEBUG_TYPE "tensor-to-linalg-pattern"
20
21
using namespace
mlir
;
22
23
//===----------------------------------------------------------------------===//
24
// Pattern population
25
//===----------------------------------------------------------------------===//
26
27
void
mlir::populateTensorToLinalgPatterns
(
RewritePatternSet
&
patterns
) {
28
// TODO: Add the remaining patterns, e.g. to decompose Pack/Unpack Ops.
29
// Alternatively, delete this file.
30
patterns
.add<
mlir::linalg::DecomposePadOpPattern
>(
patterns
.getContext());
31
}
TensorToLinalg.h
mlir::RewritePatternSet
Definition:
PatternMatch.h:826
Transforms.h
Tensor.h
AffineMap.h
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
mlir::populateTensorToLinalgPatterns
void populateTensorToLinalgPatterns(RewritePatternSet &patterns)
Appends to a pattern list additional patterns for translating tensor ops to Linalg ops.
Definition:
TensorToLinalg.cpp:27
mlir::patterns
const FrozenRewritePatternSet & patterns
Definition:
GreedyPatternRewriteDriver.h:233
mlir::linalg::DecomposePadOpPattern
Rewrite a tensor::PadOp into a sequence of EmptyOp, FillOp and InsertSliceOp.
Definition:
Transforms.h:1517
Generated on Sat Mar 29 2025 12:33:35 for MLIR by
1.9.1