[Bugfix] Fix ROCm support in CMakeLists.txt (#3534)

This commit is contained in:
James Whedbee 2024-03-20 16:05:03 -05:00 committed by GitHub
parent ba8ae1d84f
commit 80e254834d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ 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)
if (CUDA_FOUND AND NOT NVCC_EXECUTABLE)
message(FATAL_ERROR "nvcc not found")
endif()