Skip to content
Snippets Groups Projects
Commit 867ad378 authored by Yizhi Liu's avatar Yizhi Liu Committed by Tianqi Chen
Browse files

check attach_stage & group in schedule.copy() (#139)

parent 52ad69fc
No related branches found
No related tags found
No related merge requests found
......@@ -390,17 +390,25 @@ Schedule Schedule::copy() const {
}
for (Stage s : n->stages) {
if (s->attach_stage.defined()) {
CHECK(smap.find(s->attach_stage) != smap.end())
<< s->attach_stage << " not found in " << (*this);
s->attach_stage = smap.at(s->attach_stage);
}
if (s->group.defined()) {
CHECK(smap.find(s->group) != smap.end())
<< s->group << " not found in " << (*this);
s->group = smap.at(s->group);
}
}
for (Stage s : n->groups) {
if (s->attach_stage.defined()) {
CHECK(smap.find(s->attach_stage) != smap.end())
<< s->attach_stage << " not found in " << (*this);
s->attach_stage = smap.at(s->attach_stage);
}
if (s->group.defined()) {
CHECK(smap.find(s->group) != smap.end())
<< s->group << " not found in " << (*this);
s->group = smap.at(s->group);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment