[CUDA 13] CMake/Dependencies: no need to call find_package(CUB) (#159854)

CUB library is the part of CCCL of the CUDA Toolkit 13. If CUDA Found, CUB is found as well.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/159854
Approved by: https://github.com/eqy
This commit is contained in:
Aidyn-A
2025-08-06 06:03:58 +00:00
committed by PyTorch MergeBot
parent 2457e62c90
commit e9d27aa8fd

View File

@ -1143,7 +1143,7 @@ if(USE_UCC)
endif()
# ---[ CUB
if(USE_CUDA)
if(USE_CUDA AND CUDA_VERSION VERSION_LESS 13.0)
find_package(CUB)
if(NOT CUB_FOUND)
message(FATAL_ERROR "Cannot find CUB.")