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
30f7699b
Unverified
Commit
30f7699b
authored
Apr 25, 2018
by
Robert Kimball
Committed by
GitHub
Apr 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cmake files and tests to allow building ngraph without the CPU backend (#910)
parent
bd51497b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
40 deletions
+9
-40
CMakeLists.txt
CMakeLists.txt
+3
-0
CMakeLists.txt
src/ngraph/CMakeLists.txt
+3
-2
CMakeLists.txt
test/CMakeLists.txt
+1
-3
eigen.cpp
test/eigen.cpp
+0
-35
graph_partition.cpp
test/graph_partition.cpp
+2
-0
No files found.
CMakeLists.txt
View file @
30f7699b
...
...
@@ -139,6 +139,9 @@ endif()
if
(
NOT DEFINED NGRAPH_CPU_ENABLE
)
set
(
NGRAPH_CPU_ENABLE TRUE
)
endif
()
if
(
NGRAPH_CPU_ENABLE
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNGRAPH_CPU_ENABLE"
)
endif
()
if
(
NOT DEFINED NGRAPH_TBB_ENABLE
)
set
(
NGRAPH_TBB_ENABLE
${
NGRAPH_CPU_ENABLE
}
)
...
...
src/ngraph/CMakeLists.txt
View file @
30f7699b
...
...
@@ -304,10 +304,11 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND MKLDNN_INCLUDE_DIR)
DEPENDS resource_generator ext_eigen ext_llvm ext_mkldnn
BYPRODUCTS
)
add_dependencies
(
ngraph header_resource
ext_json
)
add_dependencies
(
ngraph header_resource
)
include_directories
(
SYSTEM
${
CMAKE_BINARY_DIR
}
)
include_directories
(
SYSTEM
${
JSON_INCLUDE_DIR
}
)
endif
()
add_dependencies
(
ngraph ext_json
)
include_directories
(
SYSTEM
${
JSON_INCLUDE_DIR
}
)
if
(
NOT APPLE
)
# NGraph links against one or more libraries (ex. LLVM) but we don't want to
...
...
test/CMakeLists.txt
View file @
30f7699b
...
...
@@ -34,7 +34,6 @@ set (SRC
copy.cpp
core_fusion.cpp
cpio.cpp
eigen.cpp
element_type.cpp
file_util.cpp
inliner.cpp
...
...
@@ -42,7 +41,6 @@ set (SRC
main.cpp
op.cpp
graph_partition.cpp
includes.cpp
pass_liveness.cpp
pass_manager.cpp
pass_memory_layout.cpp
...
...
@@ -180,7 +178,7 @@ if(NGRAPH_NNP_ENABLE)
target_link_libraries
(
unit-test
${
NNP_TRANSFORMER_LIB_DIR
}
/libnnp.so
)
endif
()
add_dependencies
(
unit-test ngraph libgtest ext_
eigen ext_
json
)
add_dependencies
(
unit-test ngraph libgtest ext_json
)
include_directories
(
SYSTEM
${
JSON_INCLUDE_DIR
}
)
add_custom_target
(
style-check
...
...
test/eigen.cpp
deleted
100644 → 0
View file @
bd51497b
/*******************************************************************************
* 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.
*******************************************************************************/
#include <iostream>
#include "Eigen/Dense"
#include "gtest/gtest.h"
#include "ngraph/util.hpp"
using
namespace
std
;
using
namespace
ngraph
;
TEST
(
eigen
,
simple
)
{
Eigen
::
MatrixXd
m
(
2
,
2
);
m
(
0
,
0
)
=
3
;
m
(
1
,
0
)
=
2.5
;
m
(
0
,
1
)
=
-
1
;
m
(
1
,
1
)
=
m
(
1
,
0
)
+
m
(
0
,
1
);
EXPECT_FLOAT_EQ
(
m
(
1
,
1
),
1.5
);
}
test/graph_partition.cpp
View file @
30f7699b
...
...
@@ -228,6 +228,7 @@ TEST(graph_partition, placement_all_cpu_policy)
}
}
#ifdef NGRAPH_CPU_ENABLE
TEST
(
graph_partition
,
placement_int_with_cpu_mul_policy
)
{
Shape
shape
=
Shape
{
2
,
2
};
...
...
@@ -499,6 +500,7 @@ TEST(graph_partition, hybrid_multi_middle_nodes)
EXPECT_EQ
(
read_vector
<
float
>
(
r
),
(
test
::
NDArray
<
float
,
2
>
({{
210
,
288
},
{
378
,
480
}})).
get_vector
());
}
#endif
TEST
(
graph_partition
,
hybrid_no_split
)
{
...
...
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