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
0e8be7e3
Unverified
Commit
0e8be7e3
authored
Oct 18, 2018
by
Scott Cyphers
Committed by
GitHub
Oct 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into ayzhuang/in-place-concat
parents
da928d61
d3d27108
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
CMakeLists.txt
src/ngraph/runtime/gpu/CMakeLists.txt
+32
-2
No files found.
src/ngraph/runtime/gpu/CMakeLists.txt
View file @
0e8be7e3
...
...
@@ -72,8 +72,38 @@ if (NGRAPH_GPU_ENABLE)
-gencode=arch=compute_70,code=compute_70
)
endif
()
set_source_files_properties
(
${
CUDA_SRC
}
PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ
)
cuda_compile
(
CUDA_OBJ
${
CUDA_SRC
}
STATIC
)
set
(
DO_CUDA_COMPILE FALSE
)
if
(
CUDA9_FOUND
)
if
((
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
))
# CUDA 9 supports up to gcc 6.x
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0
)
set
(
DO_CUDA_COMPILE TRUE
)
endif
()
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"Clang"
)
# CUDA 9 supports up to clang 3.9
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0
)
set
(
DO_CUDA_COMPILE TRUE
)
endif
()
endif
()
else
()
# CUDA 8 (minimum version of CUDA we support)
if
((
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
))
# Current release of CUDA 8 supports up to gcc 5.4
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.5
)
set
(
DO_CUDA_COMPILE TRUE
)
endif
()
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"Clang"
)
# CUDA 8 supports up to clang 3.8
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9
)
set
(
DO_CUDA_COMPILE TRUE
)
endif
()
endif
()
endif
()
if
(
DO_CUDA_COMPILE
)
set_source_files_properties
(
${
CUDA_SRC
}
PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ
)
cuda_compile
(
CUDA_OBJ
${
CUDA_SRC
}
STATIC
)
endif
()
add_library
(
gpu_backend SHARED
${
SRC
}
${
CUDA_OBJ
}
)
set_target_properties
(
gpu_backend PROPERTIES VERSION
${
NGRAPH_VERSION
}
SOVERSION
${
NGRAPH_API_VERSION
}
)
...
...
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