Remove outdated CMAKE_CUDA_COMPILER_VERSION branch (#160075)

Remove the condition `if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)` in cmake/Codegen.cmake, because we are now default to CUDA >=12.0
Pull Request resolved: https://github.com/pytorch/pytorch/pull/160075
Approved by: https://github.com/Skylion007
This commit is contained in:
cyy
2025-08-09 14:23:17 +00:00
committed by PyTorch MergeBot
parent 2f4c222617
commit 01f66d08d9

View File

@ -91,7 +91,6 @@ if(INTERN_BUILD_ATEN_OPS)
torch_cuda_get_nvcc_gencode_flag(_existing_arch_flags)
set(_file_compile_flags "")
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
foreach(_arch ${archs})
if("${_arch}" STREQUAL "89")
if(_existing_arch_flags MATCHES ".*compute_86.*")
@ -114,7 +113,6 @@ if(INTERN_BUILD_ATEN_OPS)
endif()
endif()
endforeach()
endif()
list(JOIN _file_compile_flags " " _file_compile_flags)
set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "${_file_compile_flags}")