[ROCm] Update libamd_comgr.so file in triton wheel build (#149855)

In ROCm 6.4 and newer, when building Triton in the Triton-ROCm wheel build flow, newer releases of ROCm no longer have **libamd_comgr.so.2** as the .so file has been updated to **libamd_comgr.so.3** in ROCm 6.4 and newer. We conditionalize on which ROCm the wheel build is for, and choose the .so accordingly.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149855
Approved by: https://github.com/Skylion007, https://github.com/jeffdaily
This commit is contained in:
Ethan Wee 2025-03-24 17:51:14 +00:00 committed by PyTorch MergeBot
parent 60f31f551e
commit d0c06c4533

View File

@ -61,10 +61,14 @@ fi
ROCM_SO=( ROCM_SO=(
"${libamdhip}" "${libamdhip}"
"libhsa-runtime64.so.1" "libhsa-runtime64.so.1"
"libamd_comgr.so.2"
"libdrm.so.2" "libdrm.so.2"
"libdrm_amdgpu.so.1" "libdrm_amdgpu.so.1"
) )
if [[ $ROCM_INT -ge 60400 ]]; then
ROCM_SO+=("libamd_comgr.so.3")
else
ROCM_SO+=("libamd_comgr.so.2")
fi
if [[ $ROCM_INT -ge 60100 ]]; then if [[ $ROCM_INT -ge 60100 ]]; then
ROCM_SO+=("librocprofiler-register.so.0") ROCM_SO+=("librocprofiler-register.so.0")