[Build] Keep plain CUDA arch when its suffixed variant is also requested (#56549)
Signed-off-by: Andre Lustosa <alustosa@redhat.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Shengqi Chen
parent
6b24947628
commit
072c0886d5
+4
-1
@@ -425,6 +425,7 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR
|
|||||||
if("${_base}" IN_LIST _TGT_CUDA_ARCHS)
|
if("${_base}" IN_LIST _TGT_CUDA_ARCHS)
|
||||||
list(REMOVE_ITEM _SRC_CUDA_ARCHS "${_arch}")
|
list(REMOVE_ITEM _SRC_CUDA_ARCHS "${_arch}")
|
||||||
list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_base}")
|
list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_base}")
|
||||||
|
list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_base}a" "${_base}f")
|
||||||
list(APPEND _CUDA_ARCHS "${_arch}")
|
list(APPEND _CUDA_ARCHS "${_arch}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -464,8 +465,10 @@ function(cuda_archs_loose_intersection OUT_CUDA_ARCHS SRC_CUDA_ARCHS TGT_CUDA_AR
|
|||||||
string(REGEX REPLACE "[af]$" "" _base "${_arch}")
|
string(REGEX REPLACE "[af]$" "" _base "${_arch}")
|
||||||
if ("${_base}" IN_LIST _SRC_CUDA_ARCHS)
|
if ("${_base}" IN_LIST _SRC_CUDA_ARCHS)
|
||||||
list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_arch}")
|
list(REMOVE_ITEM _TGT_CUDA_ARCHS "${_arch}")
|
||||||
list(REMOVE_ITEM _SRC_CUDA_ARCHS "${_base}")
|
|
||||||
list(APPEND _CUDA_ARCHS "${_arch}")
|
list(APPEND _CUDA_ARCHS "${_arch}")
|
||||||
|
if (NOT "${_base}" IN_LIST _TGT_CUDA_ARCHS)
|
||||||
|
list(REMOVE_ITEM _SRC_CUDA_ARCHS "${_base}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user