Skip to content
Snippets Groups Projects
Commit ca9f3547 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Rename *CUDA* vars to *NVCC*

parent d923f055
No related branches found
No related tags found
No related merge requests found
...@@ -46,10 +46,10 @@ ARCHLDFLAGS = ...@@ -46,10 +46,10 @@ ARCHLDFLAGS =
ARCHLIBS = ARCHLIBS =
# Compiler flags for CUDA projects. # Compiler flags for CUDA projects.
ARCHCUDACXXFLAGS = ARCHNVCCFLAGS =
# Linker flags for CUDA projects. # Linker flags for CUDA projects.
ARCHCUDALDFLAGS = ARCHNVCCLDFLAGS =
##################################################################### #####################################################################
# #
...@@ -99,10 +99,10 @@ ifneq ($(shell which nvcc), ) ...@@ -99,10 +99,10 @@ ifneq ($(shell which nvcc), )
# TODO Allow override, don't # TODO Allow override, don't
# assume CUDADIR=FSLDIR # 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}) GENCODEFLAGS = $(shell ${FSLDIR}/config/common/supportedGencodes.sh ${CUDAVER})
CUDADIR = ${FSLDIR} CUDADIR = ${FSLDIR}
# nvcc-specific tweaks: # nvcc-specific tweaks:
# - Define ARMA_ALLOW_FAKE_GCC, otherwise byte-alignment issues # - Define ARMA_ALLOW_FAKE_GCC, otherwise byte-alignment issues
...@@ -112,22 +112,22 @@ ifneq ($(shell which nvcc), ) ...@@ -112,22 +112,22 @@ ifneq ($(shell which nvcc), )
# transpiled cuda code will trigger "warning: style of line # transpiled cuda code will trigger "warning: style of line
# directive is a GCC extension". # directive is a GCC extension".
# - Specify the compiler to use with --compiler-bindir, as nvcc # - Specify the compiler to use with --compiler-bindir, as nvcc
# will otherwise naively call "gcc" # might otherwise naively call "gcc"
ARCHCUDACXXFLAGS = -I${CUDADIR}/include \ ARCHNVCCFLAGS = -I${CUDADIR}/include \
-maxrregcount=64 \ -maxrregcount=64 \
${GENCODE_FLAGS} \ ${GENCODEFLAGS} \
-DARMA_ALLOW_FAKE_GCC \ -DARMA_ALLOW_FAKE_GCC \
--compiler-bindir \ --compiler-bindir \
$(shell which $(CC)) \ $(shell which $(CC)) \
--compiler-options \ --compiler-options \
"$(filter-out -pedantic, ${ARCHCXXFLAGS})" "$(filter-out -pedantic, ${ARCHCXXFLAGS})"
ARCHCUDALDFLAGS = -L${CUDADIR}/lib \ ARCHNVCCLDFLAGS = -L${CUDADIR}/lib \
-L${CUDADIR}/lib/stubs -L${CUDADIR}/lib/stubs
# TODO All this stuff removed
ifeq ($(SYSTYPE), Darwin) ifeq ($(SYSTYPE), Darwin)
# Project specific variables # Project specific variables
EDDYBUILDPARAMETERS = "cuda=1 CUDAVER=7.5" "cpu=1"
FDT_COMPILE_GPU = 0 FDT_COMPILE_GPU = 0
PTX2_COMPILE_GPU = 0 PTX2_COMPILE_GPU = 0
endif # if Darwin endif # if Darwin
...@@ -135,8 +135,6 @@ ifneq ($(shell which nvcc), ) ...@@ -135,8 +135,6 @@ ifneq ($(shell which nvcc), )
ifeq ($(SYSTYPE), Linux) ifeq ($(SYSTYPE), Linux)
# Project specific variables # Project specific variables
PARALLELFLAGS = -fopenmp
EDDYBUILDPARAMETERS = "cuda=1 CUDAVER=8.0" "cuda=1 CUDAVER=9.1" "cpu=1"
FDT_COMPILE_GPU = 1 FDT_COMPILE_GPU = 1
PTX2_COMPILE_GPU = 1 PTX2_COMPILE_GPU = 1
endif # if Linux endif # if Linux
......
...@@ -15,11 +15,11 @@ USRCXXFLAGS = # Project-specific compiler flags for C++ projects ...@@ -15,11 +15,11 @@ USRCXXFLAGS = # Project-specific compiler flags for C++ projects
LIBS = # Project-specific libraries to link against for C LIBS = # Project-specific libraries to link against for C
# and C++ projects - these are incorporated into the # and C++ projects - these are incorporated into the
# final LDFLAGS, below. # final LDFLAGS, below.
USRCUDACXXFLAGS = # Project-specific compiler flags for CUDA projects USRNVCCFLAGS = # Project-specific compiler flags for CUDA projects
USRCUDALDFLAGS = # Project-specific linker flags for CUDA projects USRNVCCLDFLAGS = # Project-specific linker flags for CUDA projects
CUDALIBS = # Project-specific libraries to link against for CUDA CUDALIBS = # Project-specific libraries to link against for CUDA
# projects - these are incorporated into the final # projects - these are incorporated into the final
# CUDALDFLAGS, below. # NVCCLDFLAGS, below.
# Project outputs - these variables control # Project outputs - these variables control
# what gets installed from a project. They # what gets installed from a project. They
...@@ -67,28 +67,28 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ...@@ -67,28 +67,28 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
############################# #############################
# Ignore flags provided by the environment # Ignore flags provided by the environment
CFLAGS = CFLAGS =
CXXFLAGS = CXXFLAGS =
CPPFLAGS = CPPFLAGS =
CUDACXXFLAGS = NVCCFLAGS =
LDFLAGS = LDFLAGS =
CUDALDFLAGS = NVCCLDFLAGS =
# All projects must use these flags for # All projects must use these flags for
# compilation/linking, using the form: # compilation/linking, using the form:
# #
# $(CC) $(CFLAGS) <project flags/files> $(LDFLAGS) # $(CC) $(CFLAGS) <project flags/files> $(LDFLAGS)
# $(CXX) $(CXXFLAGS) <project flags/files> $(LDFLAGS) # $(CXX) $(CXXFLAGS) <project flags/files> $(LDFLAGS)
# $(NVCC) $(CUDACXXFLAGS) <project flags/files> $(LDFLAGS) $(CUDALDFLAGS) # $(NVCC) $(NVCCFLAGS) <project flags/files> $(LDFLAGS) $(NVCCLDFLAGS)
# #
# 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}
CUDALDFLAGS += ${ARCHCUDALDFLAGS} ${USRCUDALDFLAGS} \ NVCCLDFLAGS += ${ARCHNVCCLDFLAGS} ${USRNVCCLDFLAGS} \
-L. -L${DEVLIBDIR} -L${LIBDIR} \ -L. -L${DEVLIBDIR} -L${LIBDIR} \
${CUDALIBS} ${CUDALIBS}
CFLAGS += ${ARCHCFLAGS} ${USRCFLAGS} ${INCFLAGS} CFLAGS += ${ARCHCFLAGS} ${USRCFLAGS} ${INCFLAGS}
CXXFLAGS += ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS} CXXFLAGS += ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS}
CUDACXXFLAGS += ${ARCHCUDACXXFLAGS} ${USRCUDACXXFLAGS} ${INCFLAGS} NVCCFLAGS += ${ARCHNVCCFLAGS} ${USRNVCCFLAGS} ${INCFLAGS}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment