@@ -189,11 +189,30 @@ jobs:
189189 # The ROCm 7.12 preview ships HIP / rocprofiler-sdk inside the ROCm SDK
190190 # Python wheel (under site-packages/_rocm_sdk_core/lib) instead of
191191 # /opt/rocm/lib, so Proton's dlopen() can't find libamdhip64.so or
192- # librocprofiler-sdk.so without extending LD_LIBRARY_PATH.
193- # See https://rocm.docs.amd.com/en/7.12.0-preview/rocm-for-ai/vllm.html
192+ # librocprofiler-sdk.so without extending LD_LIBRARY_PATH. In addition,
193+ # that wheel ships only versioned sonames (e.g. libamdhip64.so.7) and
194+ # omits the unversioned dev symlinks, so dlopen("libamdhip64.so") fails
195+ # even when the dir is on the search path. We create the missing
196+ # symlinks here. See
197+ # https://rocm.docs.amd.com/en/7.12.0-preview/rocm-for-ai/vllm.html
194198 if [ "${{ matrix.config.name }}" = "gfx950-rocm712" ]; then
195199 ROCM_SDK_LIB="$(python3 -c 'import _rocm_sdk_core, os; print(os.path.join(os.path.dirname(_rocm_sdk_core.__file__), "lib"))')"
196200 echo "ROCM_SDK_LIB=$ROCM_SDK_LIB"
201+ ls -la "$ROCM_SDK_LIB" | head -40
202+ # Create unversioned soname symlinks (libfoo.so -> libfoo.so.N) for
203+ # anything Proton may dlopen. Skip if the unversioned file already
204+ # exists (some wheel versions do ship them).
205+ for base in libamdhip64 libhsa-runtime64 librocprofiler-sdk \
206+ libroctx64 librocprofiler-sdk-roctx libamd_comgr \
207+ libroctracer64; do
208+ if [ ! -e "$ROCM_SDK_LIB/${base}.so" ]; then
209+ versioned="$(ls "$ROCM_SDK_LIB"/${base}.so.* 2>/dev/null | sort -V | head -1 || true)"
210+ if [ -n "$versioned" ]; then
211+ ln -sf "$(basename "$versioned")" "$ROCM_SDK_LIB/${base}.so"
212+ echo "linked $ROCM_SDK_LIB/${base}.so -> $(basename "$versioned")"
213+ fi
214+ fi
215+ done
197216 export LD_LIBRARY_PATH="$ROCM_SDK_LIB:$LD_LIBRARY_PATH"
198217 export ROCP_TOOL_ATTACH=1
199218 fi
0 commit comments