[ROCm] cmake: support PYTORCH_FOUND_HIP for torch 2.13 native HIP language support (#43881)
Signed-off-by: nemanjaudovic <nudovic@amd.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
co-authored by
Shengqi Chen
parent
ef8840adc7
commit
c0056b19bf
+2
-2
@@ -144,14 +144,14 @@ endif()
|
|||||||
# Set up GPU language and check the torch version and warn if it isn't
|
# Set up GPU language and check the torch version and warn if it isn't
|
||||||
# what is expected.
|
# what is expected.
|
||||||
#
|
#
|
||||||
if (NOT HIP_FOUND AND CUDA_FOUND)
|
if (NOT HIP_FOUND AND NOT PYTORCH_FOUND_HIP AND CUDA_FOUND)
|
||||||
set(VLLM_GPU_LANG "CUDA")
|
set(VLLM_GPU_LANG "CUDA")
|
||||||
|
|
||||||
if (NOT Torch_VERSION VERSION_EQUAL ${TORCH_SUPPORTED_VERSION_CUDA})
|
if (NOT Torch_VERSION VERSION_EQUAL ${TORCH_SUPPORTED_VERSION_CUDA})
|
||||||
message(WARNING "Pytorch version ${TORCH_SUPPORTED_VERSION_CUDA} "
|
message(WARNING "Pytorch version ${TORCH_SUPPORTED_VERSION_CUDA} "
|
||||||
"expected for CUDA build, saw ${Torch_VERSION} instead.")
|
"expected for CUDA build, saw ${Torch_VERSION} instead.")
|
||||||
endif()
|
endif()
|
||||||
elseif(HIP_FOUND)
|
elseif(HIP_FOUND OR PYTORCH_FOUND_HIP)
|
||||||
set(VLLM_GPU_LANG "HIP")
|
set(VLLM_GPU_LANG "HIP")
|
||||||
|
|
||||||
# Importing torch recognizes and sets up some HIP/ROCm configuration but does
|
# Importing torch recognizes and sets up some HIP/ROCm configuration but does
|
||||||
|
|||||||
Reference in New Issue
Block a user