Skip to content

[ROCm] Add TheRock preview docker updates, Keep Python 3.12 and Ubuntu 22.04 - #49925

Open
rasmith wants to merge 71 commits into
vllm-project:mainfrom
rasmith:rock-312
Open

[ROCm] Add TheRock preview docker updates, Keep Python 3.12 and Ubuntu 22.04#49925
rasmith wants to merge 71 commits into
vllm-project:mainfrom
rasmith:rock-312

Conversation

@rasmith

@rasmith rasmith commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Purpose

This PR adds to using The Rock 7.14 with wheels provided by The Rock as a preview version while keeping Python 3.12 and Ubuntu 22.04 as-is.

Test Plan

Full CI runs.

Test Result

Current persistently failing groups that need to be addressed are:

MI355
Language Models Tests (Standard)
Multi-Modal Models (Extended Generation 3)

Keeping track in this BK build:https://buildkite.com/vllm/amd-ci/builds/12222/list


Essential Elements of an Effective PR Description Checklist
  • [X ] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • [X ] The test plan, such as providing test command.
  • [ X] The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

rasmith added 29 commits July 22, 2026 16:08
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@mergify mergify Bot added the ci/build label Jul 27, 2026
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@mergify mergify Bot removed the needs-rebase label Aug 12, 2026
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@rasmith rasmith changed the title [ROCm] Switch to the Rock, Keep Python 3.12 and Ubuntu 22.04 [ROCm] Add to TheRock preview docker updates, Keep Python 3.12 and Ubuntu 22.04 Aug 19, 2026
@rasmith rasmith changed the title [ROCm] Add to TheRock preview docker updates, Keep Python 3.12 and Ubuntu 22.04 [ROCm] Add TheRock preview docker updates, Keep Python 3.12 and Ubuntu 22.04 Aug 19, 2026
export HIP_CLANG_PATH=/opt/sccache-wrappers \
&& sccache --show-stats; \
fi \
&& PREBUILD_KERNELS=1 AITER_USE_SYSTEM_TRITON=1 GPU_ARCHS=${AITER_ROCM_ARCH} python3 setup.py bdist_wheel --dist-dir=dist \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should aiter also be pip installable?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend we push that to a follow-up ... we haven't throughly tested the AITER prebuilt wheels yet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying it today. @tjtanaa @Rohan138.

I'll put it through CI tonight.

Can we do some one do some additional testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work. I am running the full CI right now. We will need to do some additional testing. @tjtanaa @Rohan138 You can get the images from the CI and do additional testing if you want: https://buildkite.com/vllm/amd-ci/builds/12262/list

| grep -E '^(torch|triton|torchaudio|torchvision)==' > /etc/rocm-constraints.txt \
&& echo "ROCm constraints:" && cat /etc/rocm-constraints.txt \
&& test "$(wc -l < /etc/rocm-constraints.txt)" -eq 4 \
&& python3 -c "import torch; assert torch.version.hip, f'non-ROCm torch: {torch.__version__}'; print(f'torch={torch.__version__}')" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this came from debugging the torch/triton compatibility issues, can we remove this comment+rocm_constraints+torch/triton assert and print now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on this part at the moment. I"ll keep the comments short.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplification done, will post soon.

Comment thread docker/Dockerfile.rock_base Outdated
&& TRITON_VERSION=$(python3 -c "from importlib.metadata import version; print(version('triton'))") \
&& sed -i "s/^Requires-Dist: triton==.*/Requires-Dist: triton==${TRITON_VERSION}/" \
${SITE_PACKAGES}/torch-*.dist-info/METADATA \
# Editing METADATA stales its RECORD hash; restamp so wheel verifiers pass.

@Rohan138 Rohan138 Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need any of this after the sed, or was the METADATA also edited for debug purposes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch pins triton==3.7.1, so this prevents it from resolving it to a version of triton we don't want. It also prevents other resolvers from seeing the pin as unsatisfiable and then installing triton 2.13 with CUDA.

I still need to revisit this to see if a constraints file will work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a simplification, but the source builds don't add the METADATA and RECORD information that cause unpreventable reinstalls, so we do need to patch that in-place.

Comment thread docker/Dockerfile.rock_base Outdated
RUN --mount=type=bind,from=debs,src=/app/debs,target=/install \
pip install $(ls /install/*.whl | grep -v '/triton-') \
&& pip install --no-deps --force-reinstall /install/triton-*.whl \
# Point torch's pin at the triton we built. Left unsatisfied, downstream

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the downstream resolver here? Is it a subsequent pip install either in this file or in Dockerfile.rock?

@rasmith rasmith Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of resolver issues with this Triton installation. Found this out by trying to get a Triton 3.6.0 and it repeatedly got swapped out for 3.7.1, I think at least at 5 different place, most (maybe all) in Dockerfile.rock. If you're not careful, you will lose the Triton you wanted. I had to use constraints files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I have a simplification that I will be uploading shortly.

Comment thread docker/Dockerfile.rock_base Outdated
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
&& python3 --version && python3 -m pip --version

RUN pip install -U packaging 'cmake<4' ninja wheel 'setuptools<80' pybind11 Cython

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we copy over the pybind pin to 3.0.4 and the new Triton commit from https://github.com/vllm-project/vllm/pull/52819/changes? 52819 will be merged first, just waiting on CI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rohan138 What do you mean by "copy over pybind pin to 3.0.4"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread docker/Dockerfile.rock
ARG COMMON_WORKDIR=/app
ARG BASE_IMAGE=rocm/vllm-dev:base
ARG CI_BASE_IMAGE=rocm/vllm-dev:ci_base
ARG ROCM_TRITON_KERNELS_COMMIT=0f380657dbf3ee86eb57558ff71df24f03b5d4e7

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why did we pin TRITON_KERNELS to this specific commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. This was the PR: #51721

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm ... @AndreasKaratzas @micah-wil this won't hold up this PR, but I'm not sure if we should pin triton_kernels in our docker image for CI?

ARG FA_REPO="https://github.com/Dao-AILab/flash-attention.git"
ARG AITER_BRANCH="v0.1.19"
ARG AITER_REPO="https://github.com/ROCm/aiter.git"
ARG MORI_BRANCH="f95cd5e0ca7b730f92f9ffdfb358484d6965d9f7" # TheRock compatible v1.1.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a MORI PR up for this change?

@rasmith rasmith Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was working on one, but there's this PR: ROCm/mori#541. Also that change was already in MORI, but not MORI 1.1.0, maybe we could bump, but might be best to wait for the next version which should have support for The Rock.. However, the PR I linked is pretty much tip of tree.

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
@rasmith
rasmith requested a review from khluu as a code owner August 20, 2026 02:57
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Comment thread docker/Dockerfile.rock_base Outdated
ARG TRITON_REPO="https://github.com/ROCm/triton.git"
ARG FA_BRANCH="0e60e394"
ARG FA_REPO="https://github.com/Dao-AILab/flash-attention.git"
ARG AITER_BRANCH="v0.1.19.post2"

@Rohan138 Rohan138 Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revert to AITER 0.1.19 to align with upstream, I'll bump both dockerfiles to 0.1.20 as part of #52826

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build rocm Related to AMD ROCm

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants