MLIR-AIE
FoldMulAddChainToConvOp.h
Go to the documentation of this file.
1//===--FoldMulAddChainToConvOp.h - Fold Mul Add Chain To AIEVec Conv Op --===//
2//
3// This file is licensed 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// (c) Copyright 2023 Xilinx Inc.
8
9#ifndef FOLDMULADDCHAINTOCONVOP_H
10#define FOLDMULADDCHAINTOCONVOP_H
11
12#include "mlir/Pass/AnalysisManager.h"
13#include "mlir/Transforms/DialectConversion.h"
14
15namespace xilinx {
16
17enum class TargetBackend;
18
19namespace aievec {
20//===----------------------------------------------------------------------===//
21// This is the implementation of the folding pass from mul add chain
22// to AIEVec convolution operations, compatible with the AIE2 architecture.
23//===----------------------------------------------------------------------===//
24
25// Configure the legalizations for aievec conv op transformation
27 mlir::ConversionTarget &target, mlir::AnalysisManager &am,
28 TargetBackend backend);
29
30// Populate the conversion pattern by FoldMulAddChainToConvOpPattern, which
31// folds a mul add chain into mul_conv and mac_conv.
33 mlir::RewritePatternSet &patterns, mlir::AnalysisManager &am,
34 unsigned shiftParam, TargetBackend backend);
35
36} // namespace aievec
37} // namespace xilinx
38
39#endif // FOLDMULADDCHAINTOCONVOP_H
void populateAIEVecConvOpTransformationPatterns(RewritePatternSet &patterns, AnalysisManager &am, unsigned shiftParam, TargetBackend backend)
void configureAIEVecConvOpTransformationLegalizations(ConversionTarget &target, AnalysisManager &am, TargetBackend backend)
TargetBackend
Definition Passes.h:27