Skip to content

Commit

Permalink
Fixed a bug in popart_config.cc std move. (#771)
Browse files Browse the repository at this point in the history
Fixed a bug in popart_config.cc std move.
  • Loading branch information
tianboh authored Dec 28, 2021
1 parent f01a6cc commit 6729ebb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ODLA/platforms/odla_popart/popart_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ std::vector<std::string> PopartConfig::mode = {"unknown", "pipeline",

const char* bool_to_str(const bool& value) { return value ? "true" : "false"; }

const std::string& get_config_path_from_cache_file(
const std::string get_config_path_from_cache_file(
const std::string& cache_path) {
std::string file_suffix(".popart");
int file_prefix = cache_path.rfind(file_suffix);
if (file_prefix == std::string::npos ||
file_prefix + file_suffix.size() < cache_path.size()) {
popart::logging::err(
"Bad cache file name. File name should end with '.popart'");
return std::move(std::string(""));
return std::string("");
}
return std::move(std::string(cache_path.substr(0, file_prefix) + ".json"));
return std::string(cache_path.substr(0, file_prefix) + ".json");
}

void PopartConfig::use_default() {
Expand Down

0 comments on commit 6729ebb

Please sign in to comment.