[Transforms] Move qor-estimation to the directive folder; [TosaAndLinalgCleanup] Rename from tosa-to-linalg-cleanup to the new name to avoid confusion
This commit is contained in:
parent
05dd74fe58
commit
8adb98a3bd
|
@ -36,7 +36,7 @@ std::unique_ptr<Pass> createCreateTokenFlowPass();
|
|||
std::unique_ptr<Pass>
|
||||
createFuncDataflowPass(std::string dataflowTargetFunc = "forward",
|
||||
unsigned dataflowGran = 1, bool dataflowBalance = true);
|
||||
std::unique_ptr<Pass> createTosaToLinalgCleanupPass();
|
||||
std::unique_ptr<Pass> createTosaAndLinalgCleanupPass();
|
||||
std::unique_ptr<Pass> createHoistStreamChannelPass();
|
||||
|
||||
/// Runtime-related passes.
|
||||
|
|
|
@ -115,10 +115,10 @@ def FuncDataflow : Pass<"scalehls-func-dataflow", "ModuleOp"> {
|
|||
];
|
||||
}
|
||||
|
||||
def TosaToLinalgCleanup : Pass<"scalehls-tosa-to-linalg-cleanup", "FuncOp"> {
|
||||
def TosaAndLinalgCleanup : Pass<"scalehls-tosa-to-linalg-cleanup", "FuncOp"> {
|
||||
let summary = "Lower tosa::ReshapeOp and tensor::PadOp";
|
||||
|
||||
let constructor = "mlir::scalehls::createTosaToLinalgCleanupPass()";
|
||||
let constructor = "mlir::scalehls::createTosaAndLinalgCleanupPass()";
|
||||
}
|
||||
|
||||
def HoistStreamChannel : Pass<"scalehls-hoist-stream-channel", "ModuleOp"> {
|
||||
|
|
|
@ -3,13 +3,14 @@ add_mlir_library(MLIRScaleHLSTransforms
|
|||
Directive/CreateHLSCppPrimitive.cpp
|
||||
Directive/FuncPipelining.cpp
|
||||
Directive/LoopPipelining.cpp
|
||||
Directive/QoREstimation.cpp
|
||||
Graph/CreateTokenFlow.cpp
|
||||
Graph/FakeQuantize.cpp
|
||||
Graph/FuncDataflow.cpp
|
||||
Graph/HeuristicNodeFusion.cpp
|
||||
Graph/HoistStreamChannel.cpp
|
||||
Graph/SimplifyTosaGraph.cpp
|
||||
Graph/TosaToLinalgCleanup.cpp
|
||||
Graph/TosaAndLinalgCleanup.cpp
|
||||
Loop/AffineLoopDataflow.cpp
|
||||
Loop/AffineLoopOrderOpt.cpp
|
||||
Loop/AffineLoopPerfection.cpp
|
||||
|
@ -30,7 +31,6 @@ add_mlir_library(MLIRScaleHLSTransforms
|
|||
LegalizeToHLSCpp.cpp
|
||||
MultipleLevelDSE.cpp
|
||||
Passes.cpp
|
||||
QoREstimation.cpp
|
||||
Utils.cpp
|
||||
|
||||
DEPENDS
|
||||
|
|
|
@ -39,8 +39,8 @@ struct ReshapeOpRewritePattern : public OpRewritePattern<tosa::ReshapeOp> {
|
|||
} // namespace
|
||||
|
||||
namespace {
|
||||
struct TosaToLinalgCleanup
|
||||
: public TosaToLinalgCleanupBase<TosaToLinalgCleanup> {
|
||||
struct TosaAndLinalgCleanup
|
||||
: public TosaAndLinalgCleanupBase<TosaAndLinalgCleanup> {
|
||||
void runOnOperation() override {
|
||||
auto func = getOperation();
|
||||
auto context = func.getContext();
|
||||
|
@ -53,6 +53,6 @@ struct TosaToLinalgCleanup
|
|||
};
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<Pass> scalehls::createTosaToLinalgCleanupPass() {
|
||||
return std::make_unique<TosaToLinalgCleanup>();
|
||||
std::unique_ptr<Pass> scalehls::createTosaAndLinalgCleanupPass() {
|
||||
return std::make_unique<TosaAndLinalgCleanup>();
|
||||
}
|
|
@ -114,7 +114,7 @@ void scalehls::registerScaleHLSPyTorchPipeline() {
|
|||
pm.addPass(mlir::createCanonicalizerPass());
|
||||
pm.addPass(tosa::createTosaToLinalgNamed());
|
||||
pm.addPass(mlir::createCanonicalizerPass());
|
||||
pm.addPass(scalehls::createTosaToLinalgCleanupPass());
|
||||
pm.addPass(scalehls::createTosaAndLinalgCleanupPass());
|
||||
pm.addPass(tosa::createTosaToLinalg());
|
||||
pm.addPass(tosa::createTosaToStandard());
|
||||
|
||||
|
@ -207,7 +207,7 @@ void scalehls::registerScaleHLSPyTorchPipelineV2() {
|
|||
|
||||
pm.addPass(tosa::createTosaToLinalgNamed());
|
||||
pm.addPass(mlir::createCanonicalizerPass());
|
||||
pm.addPass(scalehls::createTosaToLinalgCleanupPass());
|
||||
pm.addPass(scalehls::createTosaAndLinalgCleanupPass());
|
||||
pm.addPass(tosa::createTosaToLinalg());
|
||||
pm.addPass(tosa::createTosaToStandard());
|
||||
pm.addPass(scalehls::createCreateRuntimeMainPass(opts.hlsTopFunc));
|
||||
|
|
Loading…
Reference in New Issue