Commit d31bd67a authored by Ransford Hyman Jr's avatar Ransford Hyman Jr Committed by Robert Kimball

Fixed the benchmark file to reflect the updated compile function usage (#2248)

* Fixed the benchmark file to reflect the updated compile function usage.  Compile returns the compiled function now

* Removed redundant compilation
parent 03bbeb90
...@@ -168,7 +168,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f, ...@@ -168,7 +168,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f,
timer.start(); timer.start();
auto backend = runtime::Backend::create(backend_name); auto backend = runtime::Backend::create(backend_name);
backend->enable_performance_data(f, timing_detail); backend->enable_performance_data(f, timing_detail);
backend->compile(f); auto compiled_func = backend->compile(f);
timer.stop(); timer.stop();
cout.imbue(locale("")); cout.imbue(locale(""));
cout << "compile time: " << timer.get_milliseconds() << "ms" << endl; cout << "compile time: " << timer.get_milliseconds() << "ms" << endl;
...@@ -214,7 +214,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f, ...@@ -214,7 +214,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f,
{ {
for (int i = 0; i < warmup_iterations; i++) for (int i = 0; i < warmup_iterations; i++)
{ {
backend->call(f, results, args); backend->call(compiled_func, results, args);
} }
} }
...@@ -236,7 +236,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f, ...@@ -236,7 +236,7 @@ vector<runtime::PerformanceCounter> run_benchmark(shared_ptr<Function> f,
} }
} }
} }
backend->call(f, results, args); backend->call(compiled_func, results, args);
if (copy_data) if (copy_data)
{ {
for (size_t result_index = 0; result_index < results.size(); result_index++) for (size_t result_index = 0; result_index < results.size(); result_index++)
......
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