Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SeetaResearch
/
Dragon
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 310bcb5f
authored
7 years ago
by
Ting PAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CMakeLists.txt
1 parent
ba81b99b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
Dragon/CMakeLists.txt
Dragon/modules/python/CMakeLists.txt
Dragon/python/setup.py
Dragon/CMakeLists.txt
View file @
310bcb5
...
...
@@ -12,7 +12,7 @@ option(WITH_PYTHON "Set ON to use PYTHON" ON)
option
(
WITH_CUDA
"Set ON to use CUDA"
ON
)
option
(
WITH_CUDNN
"Set ON to use CUDNN"
ON
)
option
(
WITH_BLAS
"Set ON to use BLAS"
ON
)
option
(
WITH_OMP
"Set ON to use OpenMP"
O
FF
)
option
(
WITH_OMP
"Set ON to use OpenMP"
O
N
)
option
(
WITH_SSE
"Set ON to use SSE 4.1"
ON
)
option
(
WITH_MPI
"Set ON to use MPI"
OFF
)
option
(
WITH_MPI_CUDA
"Set ON to use MPI-CUDA"
OFF
)
...
...
@@ -33,10 +33,11 @@ set(3RDPARTY_DIR ${PROJECT_SOURCE_DIR}/../3rdparty)
set
(
CUDA_ARCH -gencode arch=compute_30,code=sm_30
-gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=sm_50
-gencode arch=compute_60,code=sm_60
)
-gencode arch=compute_60,code=sm_60
-gencode arch=compute_70,code=sm_70
)
# Set CUDNN Lib
s
if necessary (Linux Only)
set
(
CUDNN_LIBRAR
IES
/usr/local/cuda/lib64
)
# Set CUDNN Lib
rary Dir
if necessary (Linux Only)
set
(
CUDNN_LIBRAR
Y_DIR
/usr/local/cuda/lib64
)
# ---------------- User Config ----------------
...
...
@@ -99,8 +100,9 @@ endif()
# ---[ libs
set
(
3RDPARTY_LIBS
${
3RDPARTY_DIR
}
/lib
)
link_directories
(
${
3RDPARTY_LIBS
}
)
link_directories
(
${
CUDNN_LIBRARIES
}
)
link_directories
(
${
PYTHON_LIBRARIES
}
)
if
(
WITH_CUDNN
)
link_directories
(
${
CUDNN_LIBRARY_DIR
}
)
endif
()
# ---[ Install
set
(
CMAKE_INSTALL_PREFIX
${
PROJECT_SOURCE_DIR
}
CACHE STRING
"set install prefix"
FORCE
)
...
...
@@ -148,7 +150,6 @@ if (WITH_SSE)
endif
()
if
(
WITH_MPI
)
ADD_DEFINITIONS
(
-DWITH_MPI
)
#set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} ${3RDPARTY_LIBS}/../openmpi/install/lib)
message
(
STATUS
"Use MPI [Optional]"
)
endif
()
if
(
WITH_MPI_CUDA
)
...
...
@@ -167,14 +168,14 @@ endif()
# ---[ Flags
set
(
CUDA_NVCC_FLAGS
"
${
CUDA_NVCC_FLAGS
}
${
CUDA_ARCH
}
"
)
if
(
WIN32
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MP /O2"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MP /O2
/Oi /GL /Ot /Gy
"
)
if
(
WITH_OMP
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/openmp"
)
endif
()
endif
()
if
(
UNIX
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-
w -fPIC -O2
-m64 -std=c++11"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-
s -
fPIC"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-
s -w -fPIC -O3
-m64 -std=c++11"
)
if
(
WITH_OMP
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fopenmp"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fopenmp"
)
...
...
This diff is collapsed.
Click to expand it.
Dragon/modules/python/CMakeLists.txt
View file @
310bcb5
...
...
@@ -21,6 +21,7 @@ FILE(GLOB targets ${3RDPARTY_LIBS}/*.so ${3RDPARTY_LIBS}/*.lib)
foreach
(
target
${
targets
}
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
_python
${
target
}
)
endforeach
()
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
_python
${
PYTHON_LIBRARIES
}
)
# ---[ link optional libs
if
(
UNIX AND WITH_CUDNN
)
...
...
This diff is collapsed.
Click to expand it.
Dragon/python/setup.py
View file @
310bcb5
...
...
@@ -36,7 +36,7 @@ find_packages('dragon')
find_modules
()
setup
(
name
=
'dragon'
,
version
=
'0.2.1.1
6
'
,
version
=
'0.2.1.1
7
'
,
description
=
'Dragon: A Computation Graph Virtual Machine Based Deep Learning Framework'
,
url
=
'https://github.com/seetaresearch/Dragon'
,
author
=
'Ting Pan'
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment