Commit abb27ba0 authored by Paul's avatar Paul
Browse files

Formatting

parent 3e141c95
......@@ -340,7 +340,10 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
total_vec.reserve(n);
for(std::size_t i = 0; i < n; i++)
{
total_vec.push_back(time<milliseconds>([&] { eval(params); ctx.finish(); }));
total_vec.push_back(time<milliseconds>([&] {
eval(params);
ctx.finish();
}));
}
std::sort(total_vec.begin(), total_vec.end());
std::unordered_map<instruction_ref, std::vector<double>> ins_vec;
......@@ -354,7 +357,10 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
{
generic_eval(*this, ctx, params, [&](auto ins, auto f) {
argument result;
ins_vec[ins].push_back(time<milliseconds>([&] { result = f(); ctx.finish(); }));
ins_vec[ins].push_back(time<milliseconds>([&] {
result = f();
ctx.finish();
}));
return result;
});
}
......@@ -365,9 +371,8 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
overhead_vec.reserve(n);
for(std::size_t i = 0; i < n; i++)
{
overhead_vec.push_back(time<milliseconds>([&] {
generic_eval(*this, ctx, params, [](auto...) { return argument{}; });
}));
overhead_vec.push_back(time<milliseconds>(
[&] { generic_eval(*this, ctx, params, [](auto...) { return argument{}; }); }));
}
double total_time = common_average(total_vec);
......
......@@ -6,8 +6,7 @@ namespace cpu {
struct context
{
void finish() const
{}
void finish() const {}
};
} // namespace cpu
......
......@@ -12,10 +12,7 @@ struct context
{
shared<miopen_handle> handle;
shared<rocblas_handle_ptr> rbhandle;
void finish() const
{
gpu_sync();
}
void finish() const { gpu_sync(); }
};
} // namespace gpu
......
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