Skip to content

Commit

Permalink
[HOTFIX][5.3] Logging Warning->Info when PerfConfigs from db can't be…
Browse files Browse the repository at this point in the history
… deserialized or invalid (SWDEV-320539) (#1757)
  • Loading branch information
junliume authored Sep 19, 2022
1 parent bdf6d6a commit fe0e1d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/include/miopen/db_record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ class DbRecord

const bool ok = values.Deserialize(s);
if(!ok)
MIOPEN_LOG_WE(
"Perf db record is obsolete or corrupt: " << s << ". Performance may degrade.");
MIOPEN_LOG_IE("Perf db record is obsolete or corrupt: " << s
<< ". Performance may degrade.");
return ok;
}

Expand Down
2 changes: 1 addition & 1 deletion src/include/miopen/find_solution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ auto FindSolutionImpl(
{
return s.GetSolution(context, config);
}
MIOPEN_LOG_WE("Invalid config loaded from Perf Db: "
MIOPEN_LOG_IE("Invalid config loaded from Perf Db: "
<< s.SolverDbId() << ": " << config << ". Performance may degrade.");
}
else
Expand Down
4 changes: 4 additions & 0 deletions src/include/miopen/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ enum class LoggingLevel
constexpr const LoggingLevel LogWELevel =
MIOPEN_INSTALLABLE ? miopen::LoggingLevel::Warning : miopen::LoggingLevel::Error;

constexpr const LoggingLevel LogIELevel =
MIOPEN_INSTALLABLE ? miopen::LoggingLevel::Info : miopen::LoggingLevel::Error;

namespace debug {

/// Quiet mode for debugging/testing purposes. All logging (including MIOPEN_ENABLE_LOGGING*)
Expand Down Expand Up @@ -336,6 +339,7 @@ std::string LoggingParseFunction(const char* func, const char* pretty_func);

// Warnings in installable builds, errors otherwise.
#define MIOPEN_LOG_WE(...) MIOPEN_LOG(LogWELevel, __VA_ARGS__)
#define MIOPEN_LOG_IE(...) MIOPEN_LOG(LogIELevel, __VA_ARGS__)

#define MIOPEN_LOG_DRIVER_CMD(...) \
do \
Expand Down

0 comments on commit fe0e1d5

Please sign in to comment.