MLIR  17.0.0git
TosaToLinalg.h
Go to the documentation of this file.
1 //===-- TosaToLinalg.h - TOSA optimization pass declarations ----------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the passes for the TOSA Linalg Dialect in MLIR.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_CONVERSION_TOSATOLINALG_TOSATOLINALG_H
15 #define MLIR_CONVERSION_TOSATOLINALG_TOSATOLINALG_H
16 
17 #include "mlir/Pass/Pass.h"
18 
19 namespace mlir {
20 
21 #define GEN_PASS_DECL_TOSATOLINALG
22 #define GEN_PASS_DECL_TOSATOLINALGNAMED
23 #include "mlir/Conversion/Passes.h.inc"
24 
25 namespace tosa {
26 
27 std::unique_ptr<Pass> createTosaToLinalg();
28 std::unique_ptr<Pass> createTosaToLinalgNamed();
29 
30 /// Populates passes to convert from TOSA to Linalg on buffers. At the end of
31 /// the pass, the function will only contain linalg ops or standard ops if the
32 /// pipeline succeeds. The option to disable decompositions is available for
33 /// benchmarking performance improvements from the canonicalizations.
34 void addTosaToLinalgPasses(OpPassManager &pm,
35  bool disableTosaDecompositions = false);
36 
37 /// Populates conversion passes from TOSA dialect to Linalg dialect.
38 void populateTosaToLinalgConversionPatterns(RewritePatternSet *patterns);
39 
40 /// Populates conversion passes from TOSA dialect to Linalg named operations.
41 void populateTosaToLinalgNamedConversionPatterns(RewritePatternSet *patterns);
42 
43 } // namespace tosa
44 } // namespace mlir
45 
46 #endif // MLIR_CONVERSION_TOSATOLINALG_TOSATOLINALG_H
void populateTosaToLinalgConversionPatterns(RewritePatternSet *patterns)
Populates conversion passes from TOSA dialect to Linalg dialect.
std::unique_ptr< Pass > createTosaToLinalgNamed()
std::unique_ptr< Pass > createTosaToLinalg()
void populateTosaToLinalgNamedConversionPatterns(RewritePatternSet *patterns)
Populates conversion passes from TOSA dialect to Linalg named operations.
void addTosaToLinalgPasses(OpPassManager &pm, bool disableTosaDecompositions=false)
Populates passes to convert from TOSA to Linalg on buffers.
Include the generated interface declarations.