Commit 2e11e95d authored by Ashok Emani's avatar Ashok Emani

address review comments

parent 066fb338
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
# ****************************************************************************** # ******************************************************************************
if (NGRAPH_CPU_ENABLE AND NOT APPLE) if (NGRAPH_CPU_ENABLE)
set (SRC set (SRC
nbench.cpp nbench.cpp
) )
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
// sample models are under ../../test/models // sample models are under ../../test/models
#include <fstream> #include <fstream>
#include <ngraph/runtime/backend.hpp>
#include <ngraph/runtime/call_frame.hpp> #include <ngraph/runtime/call_frame.hpp>
#include <ngraph/runtime/manager.hpp> #include <ngraph/runtime/manager.hpp>
#include <ngraph/runtime/backend.hpp>
#include "../../test/util/test_tools.hpp" #include "../../test/util/test_tools.hpp"
using namespace std; using namespace std;
...@@ -69,11 +69,11 @@ DESCRIPTION ...@@ -69,11 +69,11 @@ DESCRIPTION
Benchmark ngraph json model with given backend. Benchmark ngraph json model with given backend.
SYNOPSIS SYNOPSIS
/tmp/nbench [-f <filename>] [-b <backend>] [-i <iterations>] nbench [-f <filename>] [-b <backend>] [-i <iterations>]
OPTIONS OPTIONS
-f model json file to use (default: model.json) -f model json file to use (default: model.json)
-b Backed to use (default: INTERPRETER) -b Backend to use (default: INTERPRETER)
-i Iterations (default: 10) -i Iterations (default: 10)
)###"; )###";
return 1; return 1;
......
...@@ -78,7 +78,7 @@ size_t count_ops_of_type(std::shared_ptr<ngraph::Function> f) ...@@ -78,7 +78,7 @@ size_t count_ops_of_type(std::shared_ptr<ngraph::Function> f)
/// performance test utilities /// performance test utilities
inline std::multimap<size_t, std::string> inline std::multimap<size_t, std::string>
agregate_timing(const std::vector<ngraph::runtime::PerformanceCounter>& perf_data) aggregate_timing(const std::vector<ngraph::runtime::PerformanceCounter>& perf_data)
{ {
std::unordered_map<std::string, size_t> timing; std::unordered_map<std::string, size_t> timing;
for (const ngraph::runtime::PerformanceCounter& p : perf_data) for (const ngraph::runtime::PerformanceCounter& p : perf_data)
...@@ -180,7 +180,7 @@ static void ...@@ -180,7 +180,7 @@ static void
[](const runtime::PerformanceCounter& p1, const runtime::PerformanceCounter& p2) { [](const runtime::PerformanceCounter& p1, const runtime::PerformanceCounter& p2) {
return p1.total_microseconds() > p2.total_microseconds(); return p1.total_microseconds() > p2.total_microseconds();
}); });
multimap<size_t, string> timing = agregate_timing(perf_data); multimap<size_t, string> timing = aggregate_timing(perf_data);
for (auto it = timing.rbegin(); it != timing.rend(); it++) for (auto it = timing.rbegin(); it != timing.rend(); it++)
{ {
cout.imbue(locale("")); cout.imbue(locale(""));
......
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