Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:44

0001 #! /bin/bash
0002 TOOL=$CMSSW_BASE/config/toolbox/$SCRAM_ARCH/tools/selected/cuda.xml
0003 
0004 # enumerate the supported streaming multiprocessor (sm) compute capabilites
0005 DOTS=$(cudaComputeCapabilities | awk '{ print $2 }' | sort -u)
0006 CAPS=$(echo $DOTS | sed -e's#\.*##g')
0007 
0008 # remove existing capabilities
0009 sed -i $TOOL -e"s# *-gencode arch=compute_..,code=sm_.. *# #g"
0010 sed -i $TOOL -e"s# *-gencode arch=compute_..,code=\[sm_..,compute_..\] *# #g"
0011 
0012 # add support for the capabilities found on this machine
0013 for CAP in $CAPS; do
0014   sed -i $TOOL -e"/flags CUDA_FLAGS/s#\"/># -gencode arch=compute_$CAP,code=[sm_$CAP,compute_$CAP]\"/>#"
0015 done
0016 
0017 # reconfigure the cuda.xml tool
0018 scram setup cuda
0019 
0020 echo "SCRAM configured to support CUDA streaming multiprocessor architectures $DOTS"