MLIR
22.0.0git
include
mlir
Dialect
Tosa
Transforms
Passes.h
Go to the documentation of this file.
1
//===-- Passes.h - TOSA optimization pass declarations ----------*- C++ -*-===//
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 declares the optimization passes for the TOSA Dialect in MLIR.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef MLIR_DIALECT_TOSA_TRANSFORMS_PASSES_H
14
#define MLIR_DIALECT_TOSA_TRANSFORMS_PASSES_H
15
16
#include "
mlir/Dialect/Tensor/IR/Tensor.h
"
17
#include "
mlir/Dialect/Tosa/IR/TosaOps.h
"
18
#include "
mlir/Pass/Pass.h
"
19
20
namespace
mlir
{
21
class
TypeConverter
;
22
namespace
tosa
{
23
24
#define GEN_PASS_DECL
25
#include "mlir/Dialect/Tosa/Transforms/Passes.h.inc"
26
27
// Expose Rewrite Functions that decompose TOSA Ops into further TOSA Ops.
28
// The rewrites can be selectively added to a conversion pass.
29
void
populateTosaDecomposeTransposeConv
(
MLIRContext
*ctx,
30
RewritePatternSet
&
patterns
);
31
void
populateTosaDecomposeDepthwise
(
MLIRContext
*ctx,
32
RewritePatternSet
&
patterns
);
33
void
populateTosaFoldConstantReciprocalPatterns
(
MLIRContext
*ctx,
34
RewritePatternSet
&
patterns
);
35
void
populateTosaFoldConstantTransposePatterns
(
MLIRContext
*ctx,
36
RewritePatternSet
&
patterns
);
37
void
populateTosaConstantReduction
(
MLIRContext
*ctx,
38
RewritePatternSet
&
patterns
,
39
bool
aggressiveReduceConstant);
40
41
void
populateTosaTypeConversion
(
TypeConverter
&converter);
42
43
std::unique_ptr<Pass>
createTosaTestQuantUtilAPIPass
();
44
45
#define GEN_PASS_REGISTRATION
46
#include "mlir/Dialect/Tosa/Transforms/Passes.h.inc"
47
48
}
// namespace tosa
49
}
// namespace mlir
50
51
#endif
// MLIR_DIALECT_TOSA_TRANSFORMS_PASSES_H
TosaOps.h
TypeConverter
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition
MLIRContext.h:63
mlir::RewritePatternSet
Definition
PatternMatch.h:816
Pass.h
Tensor.h
mlir::tosa
Definition
TosaToArith.h:23
mlir::tosa::populateTosaDecomposeDepthwise
void populateTosaDecomposeDepthwise(MLIRContext *ctx, RewritePatternSet &patterns)
Definition
TosaDecomposeDepthwise.cpp:193
mlir::tosa::createTosaTestQuantUtilAPIPass
std::unique_ptr< Pass > createTosaTestQuantUtilAPIPass()
mlir::tosa::populateTosaConstantReduction
void populateTosaConstantReduction(MLIRContext *ctx, RewritePatternSet &patterns, bool aggressiveReduceConstant)
Definition
TosaFolders.cpp:449
mlir::tosa::populateTosaFoldConstantReciprocalPatterns
void populateTosaFoldConstantReciprocalPatterns(MLIRContext *ctx, RewritePatternSet &patterns)
Definition
TosaFolders.cpp:471
mlir::tosa::populateTosaTypeConversion
void populateTosaTypeConversion(TypeConverter &converter)
Definition
TosaTypeConverters.cpp:20
mlir::tosa::populateTosaDecomposeTransposeConv
void populateTosaDecomposeTransposeConv(MLIRContext *ctx, RewritePatternSet &patterns)
Definition
TosaDecomposeTransposeConv.cpp:335
mlir::tosa::populateTosaFoldConstantTransposePatterns
void populateTosaFoldConstantTransposePatterns(MLIRContext *ctx, RewritePatternSet &patterns)
Definition
TosaFolders.cpp:466
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
mlir::patterns
const FrozenRewritePatternSet & patterns
Definition
GreedyPatternRewriteDriver.h:283
Generated on
for MLIR by
1.14.0