File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ set(MSG_CUDA_MAP "\n\n"
1010 "Reference https://developer.nvidia.com/cuda-gpus#compute for arch and family name\n\n "
1111)
1212
13+ set (USELESS_CUDA_ARCH "32;37;52;53;61;62;72;87" )
14+
1315add_definitions (-DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT)
1416
1517option (XMRIG_LARGEGRID "Support large CUDA block count > 128" ON )
@@ -64,6 +66,15 @@ list(REMOVE_ITEM SUPPORT_CUDA_ARCH "")
6466message (STATUS "CUDA Architectures supported by [${CUDA_NVCC_EXECUTABLE} ]: ${SUPPORT_CUDA_ARCH} " )
6567set (DEFAULT_CUDA_ARCH "${SUPPORT_CUDA_ARCH} " )
6668
69+ # Filter bloaty architectures
70+ foreach (CUDA_ARCH_ELEM ${USELESS_CUDA_ARCH} )
71+ list (FIND DEFAULT_CUDA_ARCH "${CUDA_ARCH_ELEM} " POS)
72+ if (POS GREATER -1)
73+ list (REMOVE_ITEM DEFAULT_CUDA_ARCH "${CUDA_ARCH_ELEM} " )
74+ endif ()
75+ endforeach ()
76+ message (STATUS "CUDA Architectures filtered defaults: ${DEFAULT_CUDA_ARCH} " )
77+
6778set (CUDA_ARCH "${DEFAULT_CUDA_ARCH} " CACHE STRING "Set GPU architecture (semicolon separated list, e.g. '-DCUDA_ARCH=20;35;60')" )
6879
6980# validate architectures (only numbers are allowed)
@@ -116,6 +127,7 @@ endforeach()
116127unset (POS)
117128unset (CUDA_ARCH_ELEM)
118129unset (SUPPORT_CUDA_ARCH)
130+ unset (USELESS_CUDA_ARCH)
119131unset (MSG_CUDA_MAP)
120132list (SORT CUDA_ARCH)
121133list (REMOVE_DUPLICATES CUDA_ARCH)
You can’t perform that action at this time.
0 commit comments