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
4d3638af
Unverified
Commit
4d3638af
authored
Feb 28, 2018
by
Robert Kimball
Committed by
GitHub
Feb 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure tools directory
parent
eb0cb9eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
34 deletions
+51
-34
CMakeLists.txt
src/tools/CMakeLists.txt
+1
-23
CMakeLists.txt
src/tools/nbench/CMakeLists.txt
+39
-0
nbench.cpp
src/tools/nbench/nbench.cpp
+11
-11
No files found.
src/tools/CMakeLists.txt
View file @
4d3638af
...
...
@@ -14,26 +14,4 @@
# limitations under the License.
# ******************************************************************************
if
(
MKLDNN_INCLUDE_DIR
)
link_directories
(
${
MKLDNN_LIB_DIR
}
)
endif
()
if
(
NGRAPH_CPU_ENABLE
)
set
(
SRC
nbench.cpp
${
PROJECT_SOURCE_DIR
}
/test/util/benchmark.cpp
)
add_executable
(
nbench
${
SRC
}
)
add_dependencies
(
nbench ngraph
)
set
(
HEADER_SEARCH_DEFINES
"NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
"
)
target_link_libraries
(
nbench ngraph
)
include_directories
(
SYSTEM
${
JSON_INCLUDE_DIR
}
)
set_source_files_properties
(
nbench.cpp PROPERTIES COMPILE_DEFINITIONS
"
${
HEADER_SEARCH_DEFINES
}
"
)
endif
()
add_subdirectory
(
nbench
)
src/tools/nbench/CMakeLists.txt
0 → 100644
View file @
4d3638af
# ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************
if
(
MKLDNN_INCLUDE_DIR
)
link_directories
(
${
MKLDNN_LIB_DIR
}
)
endif
()
if
(
NGRAPH_CPU_ENABLE
)
set
(
SRC
nbench.cpp
${
PROJECT_SOURCE_DIR
}
/test/util/benchmark.cpp
)
add_executable
(
nbench
${
SRC
}
)
add_dependencies
(
nbench ngraph
)
set
(
HEADER_SEARCH_DEFINES
"NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
"
)
target_link_libraries
(
nbench ngraph
)
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
/test"
)
set_source_files_properties
(
nbench.cpp PROPERTIES COMPILE_DEFINITIONS
"
${
HEADER_SEARCH_DEFINES
}
"
)
endif
()
src/tools/nbench.cpp
→
src/tools/nbench
/nbench
.cpp
View file @
4d3638af
...
...
@@ -24,8 +24,8 @@
#include <ngraph/runtime/backend.hpp>
#include <ngraph/runtime/call_frame.hpp>
#include <ngraph/runtime/manager.hpp>
#include "
../../test/
util/benchmark.hpp"
#include "
../../test/
util/test_tools.hpp"
#include "util/benchmark.hpp"
#include "util/test_tools.hpp"
using
namespace
std
;
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -66,16 +66,16 @@ int main(int argc, char** argv)
if
(
failed
)
{
cout
<<
R"###(
DESCRIPTION
Benchmark ngraph json model with given backend.
SYNOPSIS
DESCRIPTION
Benchmark ngraph json model with given backend.
SYNOPSIS
nbench [-f <filename>] [-b <backend>] [-i <iterations>]
OPTIONS
-f model json file to use (default: model.json)
-b Backend to use (default: INTERPRETER)
-i Iterations (default: 10)
OPTIONS
-f model json file to use (default: model.json)
-b Backend to use (default: INTERPRETER)
-i Iterations (default: 10)
)###"
;
return
1
;
}
...
...
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