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
e87b4936
Unverified
Commit
e87b4936
authored
Jan 30, 2018
by
Robert Kimball
Committed by
GitHub
Jan 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working (#423)
parent
ea29c6e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
CMakeLists.txt
CMakeLists.txt
+10
-9
CMakeLists.txt
src/ngraph/CMakeLists.txt
+3
-9
No files found.
CMakeLists.txt
View file @
e87b4936
...
...
@@ -78,9 +78,6 @@ set(NGRAPH_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/doc")
# Compiler-specific logic...
#-----------------------------------------------------------------------------------------------
# Default values...
set
(
NGRAPH_CXX_WARNING_FLAGS
""
)
# Compiler-specific logic...
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"^(Apple)?Clang$"
)
message
(
STATUS
"Setting clang flags..."
)
...
...
@@ -107,18 +104,22 @@ endif()
# GPU support
#-----------------------------------------------------------------------------------------------
# Setup CUDA and cuDNN if NGRAPH_GPU_ENABLE=TRUE
if
(
NGRAPH_GPU_ENABLE
)
find_package
(
CUDA 8 REQUIRED
)
find_package
(
CUDNN 5 QUIET REQUIRED
)
include_directories
(
${
CUDA_INCLUDE_DIRS
}
${
CUDNN_INCLUDE_DIR
}
${
LLVM_INCLUDE_DIR
}
)
if
(
CMAKE_C_COMPILER_ID STREQUAL
"GNU"
AND
find_package
(
CUDA 8 QUIET
)
if
(
CUDA_FOUND
AND
(
NOT DEFINED NGRAPH_GPU_ENABLE OR NGRAPH_GPU_ENABLE
))
message
(
STATUS
"GPU Backend Enabled"
)
set
(
NGRAPH_GPU_ENABLE TRUE
)
find_package
(
CUDNN 5 QUIET REQUIRED
)
include_directories
(
SYSTEM
${
CUDA_INCLUDE_DIRS
}
${
CUDNN_INCLUDE_DIR
}
${
LLVM_INCLUDE_DIR
}
)
if
(
CMAKE_C_COMPILER_ID STREQUAL
"GNU"
AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0 AND
CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER
)
message
(
FATAL_ERROR
message
(
FATAL_ERROR
"CUDA 8.0 is not compatible with GCC version >= 6.
\n
"
"Please select a correct compiler version
\n
"
)
endif
()
elseif
(
NGRAPH_GPU_ENABLE
)
message
(
FATAL_ERROR
"GPU was required but CUDA library was not found"
)
endif
()
#-----------------------------------------------------------------------------------------------
...
...
src/ngraph/CMakeLists.txt
View file @
e87b4936
...
...
@@ -111,7 +111,7 @@ foreach(OP ${OPS})
foreach
(
LINE
${
OP_CLASS
}
)
string
(
REGEX REPLACE
".*class ([A-Za-z0-9_]+) : public ([A-Za-z0-9_]+).*"
"
\\
1:
\\
2"
CLASS_FOUND
${
LINE
}
)
set
(
OP_CLASS_LIST
${
OP_CLASS_LIST
}
${
CLASS_FOUND
}
)
endforeach
(
LINE
${
OP_CLASS
}
)
endforeach
(
LINE
${
OP_CLASS
}
)
endforeach
()
message
(
STATUS
"
${
CMAKE_CURRENT_BINARY_DIR
}
/ops_list.txt"
)
string
(
REPLACE
";"
"
\n
"
OP_CLASS_LINES
"
${
OP_CLASS_LIST
}
"
)
...
...
@@ -128,14 +128,8 @@ if(NGRAPH_ADDRESS_SANITIZER)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-g -fsanitize=address -fno-omit-frame-pointer"
)
endif
()
include_directories
(
"
${
NGRAPH_INCLUDE_PATH
}
"
)
include_directories
(
SYSTEM
"
${
EIGEN_INCLUDE_DIR
}
"
)
include_directories
(
"
${
NGRAPH_INCLUDE_PATH
}
"
)
include_directories
(
SYSTEM
"
${
EIGEN_INCLUDE_DIR
}
"
)
if
(
NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
MKLDNN_INCLUDE_DIR
)
...
...
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