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

MNT: Change supportedGencodes.sh so it is just passed the cuda version,

rather than install path. Ignore compiler/link flags from the environment
parent 5faf2220
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
#
# Returns a string with allowed -gencode value pairs
# for the CUDA version given by a string that defines
# where the CUDA installation resides. If the user
# allows it can also return a "default" set of value
# pairs that should give "something" for CUDA versions
# 5.5--8.0.
#
# for the given CUDA version. If the user allows it
# can also return a "default" set of value pairs that
# should give "something" for CUDA versions 5.5--8.0.
default_arch="-gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35"
instring=$1
vn=$1
default_allowed=$2
if [ `echo $instring | grep cuda` ]
then
vn=`echo $instring | awk -F 'cuda-' '{print $2}'`
vn=`echo $vn | sed 's;/;;'`
elif [ `echo $instring | grep CUDA` ]
then
vn=`echo $instring | awk -F 'CUDA-' '{print $2}'`
vn=`echo $vn | sed 's;/;;'`
else
if [ "$default_allowed" = default_allowed ]
then
if [ "$default_allowed" = default_allowed ]; then
echo $default_arch
exit 0
else
else
exit 1
fi
fi
if [ "$vn" = 5.5 ]
if [ "$vn" = 5.5 ]
then
echo "-gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35"
exit 0
......@@ -71,12 +57,4 @@ elif [ "$vn" = 10.0 ]
then
echo "-gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75"
exit 0
else
if [ "$default_allowed" = default_allowed ]
then
echo $default_arch
exit 0
else
exit 1
fi
fi
......@@ -51,10 +51,10 @@ INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
# Final compiler/linker flags
#############################
# Honour any flags provided by the environment
CFLAGS ?=
CXXFLAGS ?=
LDFLAGS ?=
# Ignore flags provided by the environment
CFLAGS =
CXXFLAGS =
LDFLAGS =
# All projects must use these flags for
# compilation/linking, using the form:
......
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