diff --git a/src/Compiler/CompilerPasses.cpp b/src/Compiler/CompilerPasses.cpp index 15580c37f2..49c5b4719a 100644 --- a/src/Compiler/CompilerPasses.cpp +++ b/src/Compiler/CompilerPasses.cpp @@ -45,8 +45,8 @@ namespace onnx_mlir { void configurePasses() { // Set global vector machine support. VectorMachineSupport::setGlobalVectorMachineSupport(march, mcpu, ""); - configureConstPropONNXToONNXPass( - onnxConstPropExpansionBound, onnxConstPropDisablePatterns, + configureConstPropONNXToONNXPass(onnxConstPropExpansionBound, + onnxConstPropDisablePatterns, OptimizationLevel >= 3 || enableConstantProp); configureOnnxToKrnlLoweringPass(optReport == OptReport::Parallel, enableParallel, optReport == OptReport::Simd, !disableSimdOption); diff --git a/src/Pass/Passes.hpp b/src/Pass/Passes.hpp index 0f5502c912..f5fab87795 100644 --- a/src/Pass/Passes.hpp +++ b/src/Pass/Passes.hpp @@ -45,9 +45,8 @@ std::unique_ptr createConvOptONNXToONNXPass( std::unique_ptr createShapeInferencePass(); // To configure ConstPropONNXToONNXPass at program start. -void configureConstPropONNXToONNXPass( - int expansionBound, llvm::ArrayRef disabledPatterns, - bool constantPropIsEnabled); +void configureConstPropONNXToONNXPass(int expansionBound, + llvm::ArrayRef disabledPatterns, bool constantPropIsEnabled); std::unique_ptr createConstPropONNXToONNXPass(); diff --git a/src/Transform/ONNX/ConstProp.cpp b/src/Transform/ONNX/ConstProp.cpp index d95f439675..f36acdd197 100644 --- a/src/Transform/ONNX/ConstProp.cpp +++ b/src/Transform/ONNX/ConstProp.cpp @@ -1060,8 +1060,8 @@ void onnx_mlir::getConstPropONNXToONNXPatterns(RewritePatternSet &patterns) { patterns.insert(patterns.getContext()); } -void onnx_mlir::configureConstPropONNXToONNXPass( - int expansionBound, ArrayRef disabledPatterns, bool constantPropIsEnabled) { +void onnx_mlir::configureConstPropONNXToONNXPass(int expansionBound, + ArrayRef disabledPatterns, bool constantPropIsEnabled) { ConstPropONNXToONNXPassConfiguration::expansionBound = expansionBound; ConstPropONNXToONNXPassConfiguration::disabledPatterns.insert( disabledPatterns.begin(), disabledPatterns.end());