Skip to content

Commit

Permalink
Merge pull request #38344 from fwyzard/fix_cmsCudaSetup.sh
Browse files Browse the repository at this point in the history
Fix cmsCudaSetup.sh to follow the latest changes to cuda.xml [12.4.x]
  • Loading branch information
cmsbuild committed Jun 14, 2022
2 parents 9729e7b + 29e6fd2 commit 8d7f4b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HeterogeneousCore/CUDAServices/scripts/cmsCudaSetup.sh
Expand Up @@ -6,12 +6,12 @@ DOTS=$(cudaComputeCapabilities | awk '{ print $2 }' | sort -u)
CAPS=$(echo $DOTS | sed -e's#\.*##g')

# remove existing capabilities
sed -i $TOOL -e"s#-gencode arch=compute_..,code=sm_.. *##g"
sed -i $TOOL -e"\#<flags CUDA_FLAGS=\"\"/>#d"
sed -i $TOOL -e"s# *-gencode arch=compute_..,code=sm_.. *# #g"
sed -i $TOOL -e"s# *-gencode arch=compute_..,code=\[sm_..,compute_..\] *# #g"

# add support for the capabilities found on this machine
for CAP in $CAPS; do
sed -i $TOOL -e"\#</client>#a\ <flags CUDA_FLAGS=\"-gencode arch=compute_$CAP,code=sm_$CAP\"/>"
sed -i $TOOL -e"/flags CUDA_FLAGS/s#\"/># -gencode arch=compute_$CAP,code=[sm_$CAP,compute_$CAP]\"/>#"
done

# reconfigure the cuda.xml tool
Expand Down

0 comments on commit 8d7f4b1

Please sign in to comment.