!1451 add hccl config file path var RANK_TABLE_FILE

Merge pull request !1451 from jjfeing/master
This commit is contained in:
mindspore-ci-bot 2020-05-26 09:04:53 +08:00 committed by Gitee
commit 963f7ee5cd
1 changed files with 5 additions and 2 deletions

View File

@ -473,9 +473,12 @@ bool AscendKernelRuntime::HcclInit() {
}
MS_LOG(INFO) << "do hcom init";
const char *config_path_str = std::getenv("MINDSPORE_HCCL_CONFIG_PATH");
auto config_path_str = std::getenv("MINDSPORE_HCCL_CONFIG_PATH");
if (config_path_str == nullptr) {
MS_LOG(ERROR) << "get hccl json config failed, please set env MINDSPORE_HCCL_CONFIG_PATH";
config_path_str = std::getenv("RANK_TABLE_FILE");
if (config_path_str == nullptr) {
MS_LOG(ERROR) << "get hccl json config failed, please set env MINDSPORE_HCCL_CONFIG_PATH or RANK_TABLE_FILE";
}
return false;
}
auto full_path = realpath(config_path_str, nullptr);