Skip to content

Commit

Permalink
[Enhancement] Add user warning and instructions for sysDB and kernel …
Browse files Browse the repository at this point in the history
…installation (#1224)

* Add warning & inst to install if sysDB missing

* Modify doc to instruct users to install sysDB

* adopt review recommendations
  • Loading branch information
junliume authored Oct 28, 2021
1 parent 0a095af commit 5cb2e54
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
7 changes: 6 additions & 1 deletion doc/src/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ GPU architecture-specific pre-compiled kernel packages are available in the ROCm

These packages are optional for the functioning of MIOpen and must be separately installed from MIOpen. Users who wish to conserve disk space may choose not to install these packages at the cost of higher startup latency. Users have the flexibility to only install kernel packages for installed device architecture, thus minimizing disk space usage.

Please refer to the MIOpen installation instructions for guidance on installing the MIOpen kernels package.
If MIOpen kernels package is not installed, or if we do not deliver the kernels suitable for the user's GPU, then the user will get warning message like this:
> MIOpen(HIP): Warning [SQLiteBase] Missing system database file:gfx906_60.kdb Performance may degrade
The performance degradation mentioned in the warning only affects the network start-up time (aka "initial iteration time") and thus can be safely ignored.

Please refer to the MIOpen installation instructions: [installing MIOpen kernels package](https://rocmsoftwareplatform.github.io/MIOpen/doc/html/install.html#installing-miopen-kernels-package) for guidance on installing the MIOpen kernels package.
20 changes: 17 additions & 3 deletions src/include/miopen/sqlite_db.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class SQLiteBase
sql = SQLite{filename_, is_system};
if(!sql.Valid())
{
bool isKDB = boost::filesystem::path(filename).extension() == ".kdb";
dbInvalid = true;
filename = "";
if(!is_system)
Expand All @@ -257,9 +258,22 @@ class SQLiteBase
{
const auto log_level =
(!MIOPEN_DISABLE_SYSDB) ? LoggingLevel::Warning : LoggingLevel::Info;
MIOPEN_LOG(log_level,
"Unable to read system database file:" + filename_ +
" Performance may degrade");
if (isKDB && (log_level == LoggingLevel::Warning))
{
static const auto kdb_message_issued = [&](){
MIOPEN_LOG_W("Missing system database file: " << filename_ <<
" Performance may degrade. Please follow instructions to install: "
"https://github.com/ROCmSoftwarePlatform/MIOpen#installing-miopen-kernels-package");
return true;
}();
std::ignore = kdb_message_issued;
}
else
{
MIOPEN_LOG(log_level,
"Unable to read system database file:" + filename_ +
" Performance may degrade");
}
}
}
else
Expand Down

0 comments on commit 5cb2e54

Please sign in to comment.