Files
pytorch/cmake/Modules/FindCUB.cmake
cyy 3ee8828c87 [1/N] Don't use CUDA.cmake module (#157188)
Small changes before removing CUDA.cmake.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157188
Approved by: https://github.com/ezyang
2025-07-08 03:05:35 +00:00

20 lines
498 B
CMake

# Try to find the CUB library and headers.
# CUB_FOUND - system has CUB
# CUB_INCLUDE_DIRS - the CUB include directory
find_path(CUB_INCLUDE_DIR
HINTS "${CUDAToolkit_INCLUDE_DIRS}"
NAMES cub/cub.cuh
DOC "The directory where CUB includes reside"
)
set(CUB_INCLUDE_DIRS ${CUB_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CUB
FOUND_VAR CUB_FOUND
REQUIRED_VARS CUB_INCLUDE_DIR
)
mark_as_advanced(CUB_FOUND)