Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
FSL
base
Commits
7561ad00
Commit
7561ad00
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Plain Diff
Merge branch 'rf/cuda-linking' into 'master'
Rf/cuda linking See merge request
!14
parents
5d57079a
177562ac
No related branches found
Branches containing commit
Tags
2107.1
Tags containing commit
1 merge request
!14
Rf/cuda linking
Pipeline
#9587
passed
3 years ago
Stage: test
Stage: fsl-ci-build
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+5
-0
5 additions, 0 deletions
CHANGELOG.md
README.md
+16
-0
16 additions, 0 deletions
README.md
config/buildSettings.mk
+5
-4
5 additions, 4 deletions
config/buildSettings.mk
with
26 additions
and
4 deletions
CHANGELOG.md
+
5
−
0
View file @
7561ad00
# FSL base project changelog
## 2107.1 (Friday 9th July 2021)
-
Fix an issue with CUDA linking.
## 2107.0 (Thursday 8th July 2021)
-
Allow CUDA projects to statically link to the CUDA runtime and
...
...
This diff is collapsed.
Click to expand it.
README.md
+
16
−
0
View file @
7561ad00
...
...
@@ -16,3 +16,19 @@ Prior to FSL 6.1.X, the contents of this project were provided by the
The
`.ci`
directory contains a collection of tests which validate the
behaviour of various aspects of the
`base`
project. All tests are written
in Python, and are executed with
`pytest`
.
## CUDA build options
The following options may be used to control compilation of a CUDA project:
-
`CUDA_HOME`
: Specify the path to the CUDA installation directory
-
`CUDA_STATIC`
: Statically link against the CUDA runtime and certain;
CUDA Toolkit libraris (default is to use dynamic linking).
-
`GENCODEFLAGS`
:
`-gencode`
options specifying the device architectures to
compile device code for (default is to use the
`config/supportedGencodes.sh`
script).
For example, to compile a CUDA project with a specific CUDA installation, and
using static linking:
make CUDA_STATIC=1 CUDA_HOME=/usr/local/cuda-10.1
This diff is collapsed.
Click to expand it.
config/buildSettings.mk
+
5
−
4
View file @
7561ad00
...
...
@@ -151,6 +151,7 @@ ifneq ($(shell which nvcc), )
# Link CUDA libraries statically, if compilation
# was invoked with "make CUDA_STATIC=1".
_CUDALIBS
=
-lcuda
ifdef
CUDA_STATIC
# The cuda/cudart libs are handled by nvcc. Other
# components of the CUDA toolkit are provided as
...
...
@@ -159,11 +160,11 @@ ifneq ($(shell which nvcc), )
# (see vars.mk)
# Other CUDA toolkit components will be added here
# on an as-needed basis.
NVCCFLAGS
+=
--cudart
=
static
_CUDALIBS
=
$(
subst
-lcublas
,-lcublas_static
-lcublasLt_static
-lculibos
,
\
NVCCFLAGS
+=
--cudart
=
static
--cudadevrt
=
static
_CUDALIBS
+
=
$(
subst
-lcublas
,-lcublas_static
-lcublasLt_static
-lculibos
,
\
$(
subst
-lcurand
,-lcurand_static,
${
CUDALIBS
}))
else
NVCCFLAGS
+=
--cudart
=
shared
_CUDALIBS
=
${
CUDALIBS
}
NVCCFLAGS
+=
--cudart
=
shared
--cudadevrt
=
static
_CUDALIBS
+
=
${
CUDALIBS
}
endif
endif
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