2020-05-07 09:41:54 +08:00
|
|
|
//===------------------------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef NPCOMP_E2E_E2E_H
|
|
|
|
#define NPCOMP_E2E_E2E_H
|
|
|
|
|
|
|
|
#include "mlir/Pass/Pass.h"
|
|
|
|
#include "mlir/Pass/PassManager.h"
|
|
|
|
|
|
|
|
namespace mlir {
|
|
|
|
namespace NPCOMP {
|
|
|
|
|
2020-05-16 07:33:01 +08:00
|
|
|
// Look in createE2ELoweringPipeline for more information about how these
|
|
|
|
// passes fit together.
|
|
|
|
//
|
|
|
|
// Pass summaries are in Passes.td.
|
|
|
|
|
2020-05-07 09:41:54 +08:00
|
|
|
std::unique_ptr<OperationPass<FuncOp>> createLowerBroadcastToToLoopsPass();
|
|
|
|
|
|
|
|
std::unique_ptr<OperationPass<FuncOp>>
|
|
|
|
createLowerLinalgOnTensorToLinalgOnMemrefPass();
|
|
|
|
|
|
|
|
std::unique_ptr<OperationPass<FuncOp>>
|
|
|
|
createResolveShapeOfOpsPass();
|
|
|
|
|
2020-05-12 05:24:57 +08:00
|
|
|
std::unique_ptr<OperationPass<FuncOp>> createResolveTensorLoadStoreOpsPass();
|
|
|
|
|
2020-05-12 09:50:51 +08:00
|
|
|
std::unique_ptr<OperationPass<FuncOp>> createLowerLinalgLoopDimOpsPass();
|
|
|
|
|
2020-05-12 12:22:40 +08:00
|
|
|
std::unique_ptr<OperationPass<FuncOp>> createLowerRankedShapesPass();
|
|
|
|
|
2020-05-16 07:33:01 +08:00
|
|
|
std::unique_ptr<OperationPass<FuncOp>> createLowerToMemRefABIPass();
|
|
|
|
|
2020-05-07 09:41:54 +08:00
|
|
|
void createLowerToHybridTensorMemRefPipeline(OpPassManager &pm);
|
|
|
|
|
|
|
|
// The main pipeline that encapsulates the full E2E lowering.
|
|
|
|
void createE2ELoweringPipeline(OpPassManager &pm);
|
|
|
|
|
|
|
|
} // namespace NPCOMP
|
|
|
|
} // namespace mlir
|
|
|
|
|
|
|
|
#endif // NPCOMP_E2E_E2E_H
|