mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
This PR fixes #157354 It fixes the issue in 'cmake/public/cuda.cmake' where a diagnostic message incorrectly showed an empty CUDA version when 'FindCUDA' and header-reported versions differed. The problem was caused by this line: set(${cuda_version_from_findcuda} ${CUDA_VERSION_STRING}) This incorrectly used the value of cuda_version_from_findcuda as a variable name. As a result the version string wasn't assigned and the error message omitted the version. This has been corrected to: set(cuda_version_from_findcuda ${CUDA_VERSION_STRING}) Now the diagnostic message properly displays the CUDA version reported by FindCUDA. Pull Request resolved: https://github.com/pytorch/pytorch/pull/157370 Approved by: https://github.com/soulitzer