mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-13 18:08:13 +00:00
Access map by iterator to silence sanity check. (#18835)
Use iterator to refer to the set. Co-authored-by: Randy Shuai <rashuai@microsoft.com>
This commit is contained in:
parent
8f7b89bd5b
commit
2952cf82a5
1 changed files with 5 additions and 2 deletions
|
|
@ -1035,8 +1035,11 @@ class PlannerImpl {
|
|||
std::function<void(NodeIndex)> dfs = [&](NodeIndex curr) {
|
||||
if (dependents.find(curr) == dependents.end()) {
|
||||
dependents.insert(curr);
|
||||
for (NodeIndex dep : dependence_graph_[curr]) {
|
||||
dfs(dep);
|
||||
auto dep_graph_iter = dependence_graph_.find(curr);
|
||||
if (dep_graph_iter != dependence_graph_.end()) {
|
||||
for (NodeIndex dep : dep_graph_iter->second) {
|
||||
dfs(dep);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue