Display warning only when ROCm version is less than Pytorch required version (#29200)

Signed-off-by: Inoki <inoki@inoki.cc>
This commit is contained in:
Inoki 2025-11-25 07:40:06 +01:00 committed by GitHub
parent ce58fdc1c3
commit 40a6f53f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,7 +136,7 @@ elseif(HIP_FOUND)
# ROCm 5.X and 6.X
if (ROCM_VERSION_DEV_MAJOR GREATER_EQUAL 5 AND
NOT Torch_VERSION VERSION_EQUAL ${TORCH_SUPPORTED_VERSION_ROCM})
Torch_VERSION VERSION_LESS ${TORCH_SUPPORTED_VERSION_ROCM})
message(WARNING "Pytorch version >= ${TORCH_SUPPORTED_VERSION_ROCM} "
"expected for ROCm build, saw ${Torch_VERSION} instead.")
endif()