@@ -257,9 +257,9 @@ endmacro()
257257# where `<=` is the version comparison operator.
258258# In other words, for each version in `TGT_CUDA_ARCHS` find the highest version
259259# in `SRC_CUDA_ARCHS` that is less or equal to the version in `TGT_CUDA_ARCHS`.
260- # We have special handling for 9 .0a, if 9 .0a is in `SRC_CUDA_ARCHS` and 9 .0 is
261- # in `TGT_CUDA_ARCHS` then we should remove 9 .0a from `SRC_CUDA_ARCHS` and add
262- # 9 .0a to the result (and remove 9 .0 from TGT_CUDA_ARCHS).
260+ # We have special handling for x .0a, if x .0a is in `SRC_CUDA_ARCHS` and x .0 is
261+ # in `TGT_CUDA_ARCHS` then we should remove x .0a from `SRC_CUDA_ARCHS` and add
262+ # x .0a to the result (and remove x .0 from TGT_CUDA_ARCHS).
263263# The result is stored in `OUT_CUDA_ARCHS`.
264264#
265265# Example:
@@ -272,8 +272,8 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR
272272 list (REMOVE_DUPLICATES SRC_CUDA_ARCHS)
273273 set (TGT_CUDA_ARCHS_ ${TGT_CUDA_ARCHS} )
274274
275- # if 9 .0a is in SRC_CUDA_ARCHS and 9 .0 is in CUDA_ARCHS then we should
276- # remove 9 .0a from SRC_CUDA_ARCHS and add 9 .0a to _CUDA_ARCHS
275+ # if x .0a is in SRC_CUDA_ARCHS and x .0 is in CUDA_ARCHS then we should
276+ # remove x .0a from SRC_CUDA_ARCHS and add x .0a to _CUDA_ARCHS
277277 set (_CUDA_ARCHS)
278278 if ("9.0a" IN_LIST SRC_CUDA_ARCHS)
279279 list (REMOVE_ITEM SRC_CUDA_ARCHS "9.0a" )
@@ -283,6 +283,14 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR
283283 endif ()
284284 endif ()
285285
286+ if ("10.0a" IN_LIST SRC_CUDA_ARCHS)
287+ list (REMOVE_ITEM SRC_CUDA_ARCHS "10.0a" )
288+ if ("10.0" IN_LIST TGT_CUDA_ARCHS)
289+ list (REMOVE_ITEM TGT_CUDA_ARCHS_ "10.0" )
290+ set (_CUDA_ARCHS "10.0a" )
291+ endif ()
292+ endif ()
293+
286294 list (SORT SRC_CUDA_ARCHS COMPARE NATURAL ORDER ASCENDING)
287295
288296 # for each ARCH in TGT_CUDA_ARCHS find the highest arch in SRC_CUDA_ARCHS that
0 commit comments