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
Apr 01, 2018
by
Ting PAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CMakeLists.txt
1 parent
ba81b99b
Show 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)
...
@@ -12,7 +12,7 @@ option(WITH_PYTHON "Set ON to use PYTHON" ON)
option
(
WITH_CUDA
"Set ON to use CUDA"
ON
)
option
(
WITH_CUDA
"Set ON to use CUDA"
ON
)
option
(
WITH_CUDNN
"Set ON to use CUDNN"
ON
)
option
(
WITH_CUDNN
"Set ON to use CUDNN"
ON
)
option
(
WITH_BLAS
"Set ON to use BLAS"
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_SSE
"Set ON to use SSE 4.1"
ON
)
option
(
WITH_MPI
"Set ON to use MPI"
OFF
)
option
(
WITH_MPI
"Set ON to use MPI"
OFF
)
option
(
WITH_MPI_CUDA
"Set ON to use MPI-CUDA"
OFF
)
option
(
WITH_MPI_CUDA
"Set ON to use MPI-CUDA"
OFF
)
...
@@ -33,10 +33,11 @@ set(3RDPARTY_DIR ${PROJECT_SOURCE_DIR}/../3rdparty)
...
@@ -33,10 +33,11 @@ set(3RDPARTY_DIR ${PROJECT_SOURCE_DIR}/../3rdparty)
set
(
CUDA_ARCH -gencode arch=compute_30,code=sm_30
set
(
CUDA_ARCH -gencode arch=compute_30,code=sm_30
-gencode arch=compute_35,code=sm_35
-gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=sm_50
-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 Lib
rary Dir
if necessary (Linux Only)
set
(
CUDNN_LIBRAR
IES
/usr/local/cuda/lib64
)
set
(
CUDNN_LIBRAR
Y_DIR
/usr/local/cuda/lib64
)
# ---------------- User Config ----------------
# ---------------- User Config ----------------
...
@@ -99,8 +100,9 @@ endif()
...
@@ -99,8 +100,9 @@ endif()
# ---[ libs
# ---[ libs
set
(
3RDPARTY_LIBS
${
3RDPARTY_DIR
}
/lib
)
set
(
3RDPARTY_LIBS
${
3RDPARTY_DIR
}
/lib
)
link_directories
(
${
3RDPARTY_LIBS
}
)
link_directories
(
${
3RDPARTY_LIBS
}
)
link_directories
(
${
CUDNN_LIBRARIES
}
)
if
(
WITH_CUDNN
)
link_directories
(
${
PYTHON_LIBRARIES
}
)
link_directories
(
${
CUDNN_LIBRARY_DIR
}
)
endif
()
# ---[ Install
# ---[ Install
set
(
CMAKE_INSTALL_PREFIX
${
PROJECT_SOURCE_DIR
}
CACHE STRING
"set install prefix"
FORCE
)
set
(
CMAKE_INSTALL_PREFIX
${
PROJECT_SOURCE_DIR
}
CACHE STRING
"set install prefix"
FORCE
)
...
@@ -148,7 +150,6 @@ if (WITH_SSE)
...
@@ -148,7 +150,6 @@ if (WITH_SSE)
endif
()
endif
()
if
(
WITH_MPI
)
if
(
WITH_MPI
)
ADD_DEFINITIONS
(
-DWITH_MPI
)
ADD_DEFINITIONS
(
-DWITH_MPI
)
#set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} ${3RDPARTY_LIBS}/../openmpi/install/lib)
message
(
STATUS
"Use MPI [Optional]"
)
message
(
STATUS
"Use MPI [Optional]"
)
endif
()
endif
()
if
(
WITH_MPI_CUDA
)
if
(
WITH_MPI_CUDA
)
...
@@ -167,14 +168,14 @@ endif()
...
@@ -167,14 +168,14 @@ endif()
# ---[ Flags
# ---[ Flags
set
(
CUDA_NVCC_FLAGS
"
${
CUDA_NVCC_FLAGS
}
${
CUDA_ARCH
}
"
)
set
(
CUDA_NVCC_FLAGS
"
${
CUDA_NVCC_FLAGS
}
${
CUDA_ARCH
}
"
)
if
(
WIN32
)
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
)
if
(
WITH_OMP
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/openmp"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/openmp"
)
endif
()
endif
()
endif
()
endif
()
if
(
UNIX
)
if
(
UNIX
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-
s -
fPIC"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-
w -fPIC -O2
-m64 -std=c++11"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-
s -w -fPIC -O3
-m64 -std=c++11"
)
if
(
WITH_OMP
)
if
(
WITH_OMP
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fopenmp"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fopenmp"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fopenmp"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fopenmp"
)
...
...
Dragon/modules/python/CMakeLists.txt
View file @
310bcb5
...
@@ -21,6 +21,7 @@ FILE(GLOB targets ${3RDPARTY_LIBS}/*.so ${3RDPARTY_LIBS}/*.lib)
...
@@ -21,6 +21,7 @@ FILE(GLOB targets ${3RDPARTY_LIBS}/*.so ${3RDPARTY_LIBS}/*.lib)
foreach
(
target
${
targets
}
)
foreach
(
target
${
targets
}
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
_python
${
target
}
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
_python
${
target
}
)
endforeach
()
endforeach
()
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
_python
${
PYTHON_LIBRARIES
}
)
# ---[ link optional libs
# ---[ link optional libs
if
(
UNIX AND WITH_CUDNN
)
if
(
UNIX AND WITH_CUDNN
)
...
...
Dragon/python/setup.py
View file @
310bcb5
...
@@ -36,7 +36,7 @@ find_packages('dragon')
...
@@ -36,7 +36,7 @@ find_packages('dragon')
find_modules
()
find_modules
()
setup
(
name
=
'dragon'
,
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'
,
description
=
'Dragon: A Computation Graph Virtual Machine Based Deep Learning Framework'
,
url
=
'https://github.com/seetaresearch/Dragon'
,
url
=
'https://github.com/seetaresearch/Dragon'
,
author
=
'Ting Pan'
,
author
=
'Ting Pan'
,
...
...
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