未验证 提交 d68af02c 编写于 作者: W Wilber 提交者: GitHub

fix analysis_config bug. (#29304)

上级 a2e9d95a
...@@ -182,6 +182,10 @@ AnalysisConfig::AnalysisConfig(const AnalysisConfig &other) { ...@@ -182,6 +182,10 @@ AnalysisConfig::AnalysisConfig(const AnalysisConfig &other) {
// deleted_pass. // deleted_pass.
auto all_passes = kTRTSubgraphPasses; auto all_passes = kTRTSubgraphPasses;
auto other_passes = other.pass_builder()->AllPasses(); auto other_passes = other.pass_builder()->AllPasses();
// We should sort them, because the user may call the SwitchIrDebug
// interface, which will change the pass.
std::sort(all_passes.begin(), all_passes.end());
std::sort(other_passes.begin(), other_passes.end());
std::vector<std::string> deleted_passes; std::vector<std::string> deleted_passes;
std::set_difference(all_passes.begin(), all_passes.end(), std::set_difference(all_passes.begin(), all_passes.end(),
other_passes.begin(), other_passes.end(), other_passes.begin(), other_passes.end(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册