fix analysis_config bug. (#29304)

revert-31562-mean
Wilber 4 years ago committed by GitHub
parent a2e9d95a4a
commit d68af02c04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -182,6 +182,10 @@ AnalysisConfig::AnalysisConfig(const AnalysisConfig &other) {
// deleted_pass.
auto all_passes = kTRTSubgraphPasses;
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::set_difference(all_passes.begin(), all_passes.end(),
other_passes.begin(), other_passes.end(),

Loading…
Cancel
Save