Abort when nvcc command is not found in the PATH (#3527)

This commit is contained in:
Allen.Dou
2024-03-21 00:28:29 +08:00
committed by GitHub
parent 5ee14494e4
commit 84eaa68425

View File

@@ -49,6 +49,12 @@ endif()
#
append_cmake_prefix_path("torch" "torch.utils.cmake_prefix_path")
# Ensure the 'nvcc' command is in the PATH
find_program(NVCC_EXECUTABLE nvcc)
if (NOT NVCC_EXECUTABLE)
message(FATAL_ERROR "nvcc not found")
endif()
#
# Import torch cmake configuration.
# Torch also imports CUDA (and partially HIP) languages with some customizations,