Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions projects/miopen/test/gtest/db_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,12 @@ void StaticFDBSync(const std::string& arch, const size_t num_cu)
// reuse the runtime selector GetSysDbSelectionCu against the real device CU (base
// Handle::GetMaxComputeUnits, bypassing the TestHandle override) -- the test then validates
// exactly what this device would load. num_cu==0 params (gfx11xx) keep their existing behavior.
const auto real_cu = static_cast<int>(handle.miopen::Handle::GetMaxComputeUnits());
if(num_cu != 0 && miopen::GetSysDbSelectionCu(arch, real_cu) != static_cast<int>(num_cu))
GTEST_SKIP();
const auto real_cu = static_cast<int>(handle.miopen::Handle::GetMaxComputeUnits());
const auto sysdb_cu = miopen::GetSysDbSelectionCu(arch, real_cu);
if(num_cu != 0 && sysdb_cu != static_cast<int>(num_cu))
GTEST_SKIP() << "Skipping " << arch << " param " << num_cu << ": this device reports "
<< real_cu << " compute units and selects the system db for " << sysdb_cu
<< ", which differs from this param.";
handle.num_cu = num_cu;
SetupPaths(fdb_file_path, pdb_file_path, kdb_file_path, handle);
std::cout << "Handle CU count: " << handle.GetMaxComputeUnits()
Expand Down Expand Up @@ -1077,4 +1080,8 @@ INSTANTIATE_TEST_SUITE_P(Smoke,
std::make_pair("gfx1102", 0),
std::make_pair("gfx1151", 0),
std::make_pair("gfx1200", 0),
std::make_pair("gfx1201", 0)));
// Only the 64-CU (32-WGP) gfx1201 ships a system DB
// (gfx120140). 32 makes StaticFDBSync skip other CU
// counts, such as the 56-CU part (28 WGP), instead of
// failing on a missing file.
std::make_pair("gfx1201", 32)));
Loading