Commit 675a25c8 authored by Paul's avatar Paul
Browse files

Print the problem and slowest solution

parent c0dc2156
...@@ -181,6 +181,7 @@ struct compile_plan ...@@ -181,6 +181,7 @@ struct compile_plan
MIGRAPHX_THROW("Multiple kernels without config"); MIGRAPHX_THROW("Multiple kernels without config");
std::cout << "Benchmarking " << preop.name() << ": " << results.size() << " configs" std::cout << "Benchmarking " << preop.name() << ": " << results.size() << " configs"
<< std::endl; << std::endl;
std::cout << "Problem: " << config->problem << std::endl;
std::vector<double> times; std::vector<double> times;
times.reserve(results.size()); times.reserve(results.size());
std::transform( std::transform(
...@@ -191,7 +192,9 @@ struct compile_plan ...@@ -191,7 +192,9 @@ struct compile_plan
.first; .first;
}); });
auto i = std::distance(times.begin(), std::min_element(times.begin(), times.end())); auto i = std::distance(times.begin(), std::min_element(times.begin(), times.end()));
auto j = std::distance(times.begin(), std::max_element(times.begin(), times.end()));
std::cout << "Fastest solution: " << config->solutions.at(i) << std::endl; std::cout << "Fastest solution: " << config->solutions.at(i) << std::endl;
std::cout << "Slowest solution: " << config->solutions.at(j) << std::endl;
std::cout << "Fastest time: " << *std::min_element(times.begin(), times.end()) << std::endl; std::cout << "Fastest time: " << *std::min_element(times.begin(), times.end()) << std::endl;
std::cout << "Slowest time: " << *std::max_element(times.begin(), times.end()) << std::endl; std::cout << "Slowest time: " << *std::max_element(times.begin(), times.end()) << std::endl;
pc.insert(preop.name(), config->problem, config->solutions.at(i)); pc.insert(preop.name(), config->problem, config->solutions.at(i));
......
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