Commit c04b5588 authored by gcwenger's avatar gcwenger Committed by Scott Cyphers

Fixed double-buffering timing (#3309)

API is synchronous per thread and threads are coordinated so that
we know when we hit the last iteration everything is done.
Using join() to gate end of iterations was introducing too much
overhead to timing as verified via checking traces.
parent f54e9159
......@@ -96,6 +96,10 @@ static void
result->read(data->get_data_ptr(),
data->get_element_count() * data->get_element_type().size());
}
if (current_iteration == (s_iterations + s_warmup_iterations - 1))
{
s_timer.stop();
}
}
}
}
......@@ -177,7 +181,6 @@ vector<runtime::PerformanceCounter> run_benchmark_pipelined(shared_ptr<Function>
{
threads[i].join();
}
s_timer.stop();
float time = s_timer.get_milliseconds();
cout << time / iterations << "ms per iteration" << endl;
......
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