Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
2e11e95d
Commit
2e11e95d
authored
Feb 15, 2018
by
Ashok Emani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address review comments
parent
066fb338
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
CMakeLists.txt
src/tools/CMakeLists.txt
+1
-1
nbench.cpp
src/tools/nbench.cpp
+3
-3
test_tools.hpp
test/util/test_tools.hpp
+2
-2
No files found.
src/tools/CMakeLists.txt
View file @
2e11e95d
...
...
@@ -14,7 +14,7 @@
# limitations under the License.
# ******************************************************************************
if
(
NGRAPH_CPU_ENABLE
AND NOT APPLE
)
if
(
NGRAPH_CPU_ENABLE
)
set
(
SRC
nbench.cpp
)
...
...
src/tools/nbench.cpp
View file @
2e11e95d
...
...
@@ -21,9 +21,9 @@
// sample models are under ../../test/models
#include <fstream>
#include <ngraph/runtime/backend.hpp>
#include <ngraph/runtime/call_frame.hpp>
#include <ngraph/runtime/manager.hpp>
#include <ngraph/runtime/backend.hpp>
#include "../../test/util/test_tools.hpp"
using
namespace
std
;
...
...
@@ -69,11 +69,11 @@ DESCRIPTION
Benchmark ngraph json model with given backend.
SYNOPSIS
/tmp/
nbench [-f <filename>] [-b <backend>] [-i <iterations>]
nbench [-f <filename>] [-b <backend>] [-i <iterations>]
OPTIONS
-f model json file to use (default: model.json)
-b Backe
d to use (default: INTERPRETER)
-b Backe
nd to use (default: INTERPRETER)
-i Iterations (default: 10)
)###"
;
return
1
;
...
...
test/util/test_tools.hpp
View file @
2e11e95d
...
...
@@ -78,7 +78,7 @@ size_t count_ops_of_type(std::shared_ptr<ngraph::Function> f)
/// performance test utilities
inline
std
::
multimap
<
size_t
,
std
::
string
>
agregate_timing
(
const
std
::
vector
<
ngraph
::
runtime
::
PerformanceCounter
>&
perf_data
)
ag
g
regate_timing
(
const
std
::
vector
<
ngraph
::
runtime
::
PerformanceCounter
>&
perf_data
)
{
std
::
unordered_map
<
std
::
string
,
size_t
>
timing
;
for
(
const
ngraph
::
runtime
::
PerformanceCounter
&
p
:
perf_data
)
...
...
@@ -180,7 +180,7 @@ static void
[](
const
runtime
::
PerformanceCounter
&
p1
,
const
runtime
::
PerformanceCounter
&
p2
)
{
return
p1
.
total_microseconds
()
>
p2
.
total_microseconds
();
});
multimap
<
size_t
,
string
>
timing
=
agregate_timing
(
perf_data
);
multimap
<
size_t
,
string
>
timing
=
ag
g
regate_timing
(
perf_data
);
for
(
auto
it
=
timing
.
rbegin
();
it
!=
timing
.
rend
();
it
++
)
{
cout
.
imbue
(
locale
(
""
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment