Commit 398d45a4 authored by Paul's avatar Paul
Browse files

Add some warning about missing configs

parent adb2feee
......@@ -121,10 +121,14 @@ static std::vector<tuning_entry> read_tuning(const std::string& s)
static std::size_t get_tuning_for(const std::vector<shape>& inputs)
{
static auto tuning = read_tuning(string_value_of(MIGRAPHX_CK_TUNING{}, ""));
if (tuning.empty())
std::cout << "*********** Warning: No CK tuning!" << std::endl;
auto it = std::find_if(
tuning.begin(), tuning.end(), [&](const auto& p) { return p.first == inputs; });
if(it == tuning.end())
if(it == tuning.end()) {
std::cout << "*********** Warning: CK tuning missing for config!" << std::endl;
return 4;
}
return it->second;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment