forked from mindspore-Ecosystem/mindspore
change enable_loop_sink default value to True
This commit is contained in:
parent
d7242002aa
commit
81644a95df
|
@ -69,7 +69,6 @@ MsContext::MsContext(const std::string &policy, const std::string &target) {
|
||||||
enable_task_sink_ = true;
|
enable_task_sink_ = true;
|
||||||
ir_fusion_flag_ = true;
|
ir_fusion_flag_ = true;
|
||||||
enable_hccl_ = false;
|
enable_hccl_ = false;
|
||||||
enable_loop_sink_ = false;
|
|
||||||
enable_mem_reuse_ = true;
|
enable_mem_reuse_ = true;
|
||||||
enable_gpu_summary_ = true;
|
enable_gpu_summary_ = true;
|
||||||
precompile_only_ = false;
|
precompile_only_ = false;
|
||||||
|
@ -78,6 +77,7 @@ MsContext::MsContext(const std::string &policy, const std::string &target) {
|
||||||
enable_dynamic_mem_pool_ = true;
|
enable_dynamic_mem_pool_ = true;
|
||||||
graph_memory_max_size_ = "0";
|
graph_memory_max_size_ = "0";
|
||||||
variable_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 << ".";
|
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 {
|
} else {
|
||||||
device_target_ = target;
|
device_target_ = target;
|
||||||
}
|
}
|
||||||
|
enable_loop_sink_ = device_target_ == kAscendDevice;
|
||||||
MS_LOG(INFO) << "ms set context device target:" << target;
|
MS_LOG(INFO) << "ms set context device target:" << target;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,7 +516,7 @@ def set_context(**kwargs):
|
||||||
enable_ir_fusion (bool): Whether to enable ir fusion. Default: True.
|
enable_ir_fusion (bool): Whether to enable ir fusion. Default: True.
|
||||||
save_graphs (bool): Whether to save graphs. Default: False.
|
save_graphs (bool): Whether to save graphs. Default: False.
|
||||||
enable_hccl (bool): Whether to enable hccl. 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_task_sink (bool): Whether to enable task sink. Default: True.
|
||||||
enable_mem_reuse (bool): Whether to enable memory reuse. 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.
|
save_ms_model (bool): Whether to save lite model converted by graph. Default: False.
|
||||||
|
|
Loading…
Reference in New Issue