add smallchanel mode

This commit is contained in:
zhangyinxia 2022-12-29 18:08:38 +08:00
parent 1c07138bb6
commit 0e5d2d570c
1 changed files with 3 additions and 1 deletions

View File

@ -621,11 +621,13 @@ void GeDeviceContext::GetGeOptions(const std::shared_ptr<MsContext> &ms_context_
}
if (training) {
(*ge_options)["ge.exec.precision_mode"] = "allow_fp32_to_fp16";
(*ge_options)["ge.exec.precision_mode"] = "allow_mix_precision";
} else {
(*ge_options)["ge.exec.precision_mode"] = "force_fp16";
}
(*ge_options)["ge.enableSmallChannel"] = "1";
// Disable the global variable acc, only enable it while adding training graph in pipeline
(*ge_options)["ge.exec.variable_acc"] = "0";