diff --git a/mindspore/ccsrc/debug/rdr/base_recorder.cc b/mindspore/ccsrc/debug/rdr/base_recorder.cc index fea8be548b7..2bd4416a631 100644 --- a/mindspore/ccsrc/debug/rdr/base_recorder.cc +++ b/mindspore/ccsrc/debug/rdr/base_recorder.cc @@ -18,7 +18,6 @@ #include #include "debug/common.h" #include "utils/utils.h" -#include "utils/ms_context.h" #include "utils/comm_manager.h" namespace mindspore { @@ -36,13 +35,7 @@ std::optional BaseRecorder::GetFileRealPath(const std::string &suff filename = filename_ + delimiter_ + suffix; } } - std::string file_path = directory_ + filename; - auto context = MsContext::GetInstance(); - MS_EXCEPTION_IF_NULL(context); - auto config_file = context->get_param(MS_CTX_ENV_CONFIG_PATH); - if (config_file.empty()) { - file_path = directory_ + "rank_" + std::to_string(GetRank()) + "/rdr/" + filename; - } + std::string file_path = directory_ + "rank_" + std::to_string(GetRank()) + "/rdr/" + filename; auto realpath = Common::CreatePrefixPath(file_path); if (!realpath.has_value()) { MS_LOG(ERROR) << "Get real path failed. "