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
227326d7
Commit
227326d7
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Tweaks to cuda compile flags (more to come). Clean target removes FXFILES
and lib files. Ignore CPPFLAGS from the environment.
parent
9430cb9d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/common/buildSettings.mk
+19
-15
19 additions, 15 deletions
config/common/buildSettings.mk
config/common/rules.mk
+2
-1
2 additions, 1 deletion
config/common/rules.mk
config/common/vars.mk
+7
-5
7 additions, 5 deletions
config/common/vars.mk
with
28 additions
and
21 deletions
config/common/buildSettings.mk
+
19
−
15
View file @
227326d7
...
@@ -84,29 +84,37 @@ endif # if Linux
...
@@ -84,29 +84,37 @@ endif # if Linux
#####################################################################
#####################################################################
#
#
#
Linux
specific sys vars and ext libs
#
CUDA
specific sys vars and ext libs
#
#
#####################################################################
#####################################################################
# CUDA
library
# CUDA
/nvcc compiler options
ifneq
($(shell which nvcc), )
ifneq
($(shell which nvcc), )
# TODO Allow override, don't
# assume CUDADIR=FSLDIR
NVCC
=
nvcc
NVCC
=
nvcc
CUDAVER
=
$(
shell nvcc
--version
|
grep
-Po
"release
\K
[0-9
\.
]+"
)
CUDAVER
=
$(
shell nvcc
--version
|
grep
-Po
"release
\K
[0-9
\.
]+"
)
GENCODE_FLAGS
=
$(
shell
${
FSLDIR
}
/config/common/supportedGencodes.sh
${
CUDAVER
})
GENCODE_FLAGS
=
$(
shell
${
FSLDIR
}
/config/common/supportedGencodes.sh
${
CUDAVER
})
CUDADIR
=
${
FSLDIR
}
CUDADIR
=
${
FSLDIR
}
CUDACXXFLAGS
=
-I
${
CUDADIR
}
/include
\
# nvcc-specific tweaks:
${
GENCODE_FLAGS
}
\
# - Define ARMA_ALLOW_FAKE_GCC, otherwise byte-alignment issues
--compiler-options
\
# may occur with armadillo datatypes (see compiler_setup.hpp
"-fexpensive-optimizations -Wall -Wno-long-long -fPIC"
\
# from the armadillo project)
-DARMA_ALLOW_FAKE_GCC
# - Do not use -pedantic, otherwise *every single line* of
CUDALDFLAGS
=
-L
${
CUDADIR
}
/lib
-lcuda
-lcurand
-lcudart
# transpiled cuda code will trigger "warning: style of line
# directive is a GCC extension".
$(info
"GPU enable"
)
CUDACXXFLAGS
=
-I
${
CUDADIR
}
/include
\
${
GENCODE_FLAGS
}
\
-DARMA_ALLOW_FAKE_GCC
\
--compiler-options
\
"
$(
filter-out -pedantic,
${
ARCHCXXFLAGS
})
"
CUDALDFLAGS
=
-lcurand
-lcudart
ifeq
($(SYSTYPE), Darwin)
ifeq
($(SYSTYPE), Darwin)
#Project specific variables
#
Project specific variables
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=7.5"
"cpu=1"
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=7.5"
"cpu=1"
FDT_COMPILE_GPU
=
0
FDT_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
...
@@ -120,8 +128,4 @@ ifneq ($(shell which nvcc), )
...
@@ -120,8 +128,4 @@ ifneq ($(shell which nvcc), )
FDT_COMPILE_GPU
=
1
FDT_COMPILE_GPU
=
1
PTX2_COMPILE_GPU
=
1
PTX2_COMPILE_GPU
=
1
endif
# if Linux
endif
# if Linux
else
$(info
"GPU disable"
)
FDT_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
endif
endif
This diff is collapsed.
Click to expand it.
config/common/rules.mk
+
2
−
1
View file @
227326d7
...
@@ -6,7 +6,8 @@ help:
...
@@ -6,7 +6,8 @@ help:
@
echo
" make install Install into your local FSLDEVDIR"
;
@
echo
" make install Install into your local FSLDEVDIR"
;
clean
:
clean
:
${
RM
}
-f
*
.o
*
.a
*
.so
*
.exe depend.mk
${
XFILES
}
${
TESTXFILES
}
${
RM
}
-f
*
.o
*
.a
*
.so
*
.exe depend.mk
\
${
XFILES
}
${
FXFILES
}
${
SOFILES
}
${
AFILES
}
${
TESTXFILES
}
install
:
install
:
@${
MAKE
}
"DESTDIR=
${
FSLDEVDIR
}
"
master-install-script
@${
MAKE
}
"DESTDIR=
${
FSLDEVDIR
}
"
master-install-script
...
...
This diff is collapsed.
Click to expand it.
config/common/vars.mk
+
7
−
5
View file @
227326d7
...
@@ -54,6 +54,7 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
...
@@ -54,6 +54,7 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
# Ignore flags provided by the environment
# Ignore flags provided by the environment
CFLAGS
=
CFLAGS
=
CXXFLAGS
=
CXXFLAGS
=
CPPFLAGS
=
LDFLAGS
=
LDFLAGS
=
# All projects must use these flags for
# All projects must use these flags for
...
@@ -64,8 +65,9 @@ LDFLAGS =
...
@@ -64,8 +65,9 @@ LDFLAGS =
#
#
# LDFLAGS *must* come at the end, to ensure proper linking.
# LDFLAGS *must* come at the end, to ensure proper linking.
LDFLAGS
+=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
LDFLAGS
+=
${
ARCHLDFLAGS
}
${
USRLDFLAGS
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
-L
.
-L
${
DEVLIBDIR
}
-L
${
LIBDIR
}
\
${
LIBS
}
${
ARCHLIBS
}
${
LIBS
}
${
ARCHLIBS
}
CFLAGS
+=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
INCFLAGS
}
CFLAGS
+=
${
ARCHCFLAGS
}
${
USRCFLAGS
}
${
INCFLAGS
}
CXXFLAGS
+=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
INCFLAGS
}
CXXFLAGS
+=
${
ARCHCXXFLAGS
}
${
USRCXXFLAGS
}
${
INCFLAGS
}
CUDACXXFLAGS
+=
${
INCFLAGS
}
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