[Bugfix][ROCm][Build] fix profiler hang due to queue interposition bug (#54171)
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Simon Danielsson committed
Sep 2, 2026 at 10:59 UTC
b205750fe0ace51bdfda25a857386161471ef19b
1 file changed
+12
docker/Dockerfile.rocm_base
+12
@@ -409,6 +409,18 @@ RUN git init -q /src && cd /src \
409
&& git sparse-checkout set projects/rocprofiler-sdk shared cmake \
410
&& git fetch --filter=blob:none --depth 1 origin ${ROCPROFILER_SDK_COMMIT} \
411
&& git checkout -q FETCH_HEAD
412
+# Patch the ROCm 7.2.3 build of rocprofiler-sdk to include queue-interposition fixes that are
413
+# absent from the pinned 7.14 build. This resolves hangs on torch.profiler on ROCm.
414
+# TODO: Drop these once ${ROCPROFILER_SDK_COMMIT} is bumped to a build that already
415
+# contains them, such as ROCm 10.0. See https://github.com/vllm-project/vllm/issues/54087.
416
+ARG ROCPROFILER_SDK_PR_7796=fae7fd57ffb8a76e811d6410b8a0cee1e94d710a
417
+ARG ROCPROFILER_SDK_PR_7924=f8db22adbe17686a9b05ae03367dd1ec73011653
418
+RUN cd /src \
419
+ && HSA_PATHS='projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hsa/*' \
420
+ && curl -fsSL -o /tmp/qi-7796.patch "${ROCPROFILER_SDK_REPO%.git}/commit/${ROCPROFILER_SDK_PR_7796}.patch" \
421
+ && curl -fsSL -o /tmp/qi-7924.patch "${ROCPROFILER_SDK_REPO%.git}/commit/${ROCPROFILER_SDK_PR_7924}.patch" \
422
+ && git apply -p1 --include="$HSA_PATHS" --verbose /tmp/qi-7796.patch \
423
+ && git apply -p1 --include="$HSA_PATHS" --verbose /tmp/qi-7924.patch
424
RUN cd /src/projects/rocprofiler-sdk \
425
&& if [ "$USE_SCCACHE" = "1" ]; then \
426
export CMAKE_C_COMPILER_LAUNCHER=sccache \