change enable_loop_sink default value to True

This commit is contained in:
caifubi 2020-04-21 10:11:20 +08:00
parent d7242002aa
commit 81644a95df
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,6 @@ MsContext::MsContext(const std::string &policy, const std::string &target) {
enable_task_sink_ = true;
ir_fusion_flag_ = true;
enable_hccl_ = false;
enable_loop_sink_ = false;
enable_mem_reuse_ = true;
enable_gpu_summary_ = true;
precompile_only_ = false;
@ -78,6 +77,7 @@ MsContext::MsContext(const std::string &policy, const std::string &target) {
enable_dynamic_mem_pool_ = true;
graph_memory_max_size_ = "0";
variable_memory_max_size_ = "0";
enable_loop_sink_ = target == kAscendDevice || target == kDavinciDevice;
MS_LOG(DEBUG) << "Create context with backend policy:" << policy << ", device target:" << target << ".";
}
@ -134,6 +134,7 @@ bool MsContext::set_device_target(const std::string &target) {
} else {
device_target_ = target;
}
enable_loop_sink_ = device_target_ == kAscendDevice;
MS_LOG(INFO) << "ms set context device target:" << target;
return true;
}

View File

@ -516,7 +516,7 @@ def set_context(**kwargs):
enable_ir_fusion (bool): Whether to enable ir fusion. Default: True.
save_graphs (bool): Whether to save graphs. Default: False.
enable_hccl (bool): Whether to enable hccl. Default: False.
enable_loop_sink (bool): Whether to enable loop sink. Default: False.
enable_loop_sink (bool): Whether to enable loop sink. Default: True.
enable_task_sink (bool): Whether to enable task sink. Default: True.
enable_mem_reuse (bool): Whether to enable memory reuse. Default: True.
save_ms_model (bool): Whether to save lite model converted by graph. Default: False.