Browse Source

pass auto mixed precision flag to ge init options

tags/v0.2.0-alpha
chenhaozhe 5 years ago
parent
commit
d88dbbb138
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/utils/context/ms_context.cc

+ 3
- 1
mindspore/ccsrc/utils/context/ms_context.cc View File

@@ -358,7 +358,9 @@ void MsContext::GetGeOptions(std::map<std::string, std::string>* ge_options) con
MS_LOG(ERROR) << "Set proto lib path failed!";
}

// Disbale the global variable acc, only enable it whlie adding training graph in pipeline
// Enable auto mixed precision according to the context options
(*ge_options)["ge.exec.auto_mix_precision"] = std::to_string(auto_mixed_precision_flag_);
// Disable the global variable acc, only enable it whlie adding training graph in pipeline
(*ge_options)["ge.exec.variable_acc"] = "0";
#endif
}


Loading…
Cancel
Save