Browse Source

close_strategy_ckpt_stream

tags/v1.1.0
yao_yf 5 years ago
parent
commit
e5efdb9571
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc

+ 2
- 0
mindspore/ccsrc/frontend/parallel/strategy_checkpoint/parallel_strategy_checkpoint.cc View File

@@ -59,6 +59,7 @@ Status StrategyCheckpoint::Load(StrategyMap *strategy_map) {
MS_LOG(ERROR) << "Load strategy file failed";
return FAILED;
}
input.close();
size_t node_num = LongToSize(parallel_strategy_map.parallel_strategy_item_size());
for (size_t i = 0; i < node_num; i++) {
straspb::ParallelStrategyItem parallel_strategy_item = parallel_strategy_map.parallel_strategy_item(SizeToLong(i));
@@ -137,6 +138,7 @@ Status StrategyCheckpoint::Save(const StrategyMap &strategy_map, const TensorInf
MS_LOG(ERROR) << "Save strategy file failed";
return FAILED;
}
output.close();
return SUCCESS;
}
} // namespace parallel


Loading…
Cancel
Save