Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
583f9fd5
There was an error fetching the commit references. Please try again later.
Commit
583f9fd5
authored
10 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Simplifying setup of CUDA build.
parent
51403793
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+5
-32
5 additions, 32 deletions
CMakeLists.txt
install
+0
-2
0 additions, 2 deletions
install
with
5 additions
and
34 deletions
CMakeLists.txt
+
5
−
32
View file @
583f9fd5
...
...
@@ -52,39 +52,12 @@ if( NOT WITH_CUDA STREQUAL "no" )
set
(
CUSPARSE_LIBRARY /usr/local/cuda/lib64/libcusparse.so
)
# TODO: fix this
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DHAVE_CUDA
)
if
(
CUDA_ARCHITECTURE STREQUAL
"2.0"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=20
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_20
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_20 -shared
)
endif
()
if
(
CUDA_ARCHITECTURE STREQUAL
"2.1"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=21
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_21
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_21 -shared
)
endif
()
if
(
CUDA_ARCHITECTURE STREQUAL
"2.2"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=22
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_22
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_22 -shared
)
endif
()
if
(
CUDA_ARCHITECTURE STREQUAL
"2.3"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=23
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_23
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_23 -shared
)
endif
()
if
(
CUDA_ARCHITECTURE STREQUAL
"3.0"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=30
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_30
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_30 -shared
)
endif
()
if
(
CUDA_ARCHITECTURE STREQUAL
"3.5"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-DCUDA_ARCH=35
)
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -arch sm_35
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -arch sm_35 -shared
)
endif
()
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\"
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -shared
)
#set( CUDA_ADD_EXECUTABLE_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" )
#set( CUDA_ADD_LIBRARY_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -shared )
set
(
CUDA_ADD_EXECUTABLE_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35
)
set
(
CUDA_ADD_LIBRARY_OPTIONS -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -shared
)
####
# Check for CUSP
#
...
...
This diff is collapsed.
Click to expand it.
install
+
0
−
2
View file @
583f9fd5
...
...
@@ -3,8 +3,6 @@
TARGET
=
TNL
INSTALL_PREFIX
=
${
HOME
}
/local
WITH_CUDA
=
yes
WITH_CUSPARSE
=
yes
CUDA_ARCHITECTURE
=
2.0
TEMPLATE_EXPLICIT_INSTANTIATION
=
yes
#VERBOSE="VERBOSE=1"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment