Repository navigation
ci: build LMCache ROCm torch 2.10 wheels from any commit - #2388
Merged
Merged
Conversation
ATOM's image ships AMD's ROCm 7.2.4 / torch 2.10 build, but LMCache only publishes a wheel for that ABI with tagged releases. Its rolling nightly-rocm wheel targets torch 2.11 and fails to load here (undefined c10::cuda::CUDACachingAllocator symbol), so an LMCache fix on dev could not reach ATOM until the next tag. Add a manually dispatched workflow that builds LMCache at a given commit with LMCache's own build script inside the same digest-pinned rocm/pytorch 2.10 image LMCache uses, validates it in a clean container (LMCache's ABI validator plus an ATOM check for the MP adapters, native entry points and the MP server flags ATOM launches with), and optionally publishes it as an immutable pre-release that the Dockerfiles can pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
Temporary, to exercise the build job on GitHub before merge; revert before merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build job passed on build-only-atom: https://github.com/ROCm/ATOM/actions/runs/35982738885 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
valarLip
approved these changes
Sep 24, 2026
This was referenced Sep 24, 2026
zufayu
added a commit
that referenced
this pull request
Oct 30, 2026
near_duplicates() only catches a duplicate that arrives as a whole new file. Most of "we already have it" / "duplicated with the one in aiter" / "use new util func" in the lead reviewer's comments is a function or class added into a file that already exists -- a shape the file-level check cannot see, since it never looks inside a diff hunk for a modified file. Adds symbol_duplicates(): for each newly added top-level def/class in a modified file's diff (whole new files stay out of scope -- near_duplicates already covers them, and double-reporting the same evidence under two headings was not the goal), compare its body (>=15 substantial lines) against every top-level def/class already in the tree (same kind, whole tree -- measured at 0.16s / ~14k symbols over ATOM's 1504 .py files, cheap enough that a name-similarity prefilter would suppress exactly the "unrelated names, near-identical bodies" case this exists to find). Same threshold as the file-level check, 60%, and same posture: a pair and a ratio, not a verdict. Measured over 197 recently merged ATOM PRs (#2388-#2830) at threshold 0.60: 2 fired (1.0%). Both spot-checked as real hits, not coincidental shape: PR#2560 modifies atom/plugin/vllm/paged_state_image.py and its tests in place, 10 pairs against the pre-existing paged_state_checkpoint.py sibling it mirrors (the "image vs checkpoint" variant pair near_duplicates' own docstring describes, but file-level could not see here because neither file is new). PR#2553 adds a test 95% identical to an existing one, down to the mocked runner setup, with one of three asserted values changed. No threshold raise needed -- 1.0% sits well inside the file-level check's own ~3% territory, with no false alarms in the spot check. Wired into the same `twins` CLI mode as a second section, after the file-level pairs; fetch.sh's existing `triage.py twins ... | tee twins.txt` call is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/workflows/lmcache-rocm-wheel.yaml, a manually dispatched workflow that builds an LMCache wheel for ATOM's image ABI (ROCm 7.2.4 / torch 2.10.0, gfx942 + gfx950) from any LMCache commit and can publish it as a pinned GitHub Release on this repository.Why
ATOM's image ships AMD's torch
2.10.0+rocm7.2.4.git3d3aa833. LMCache publishes a wheel for that ABI only with tagged releases (v*-rocm-torch210). Its rollingnightly-rocmwheel is built against torch 2.11 for the upstream vLLM image. I installed today's nightly (0.5.6.dev98+rocm7.2, built from dev@05fc77a) in an ATOM image, and its native extension fails to load:So LMCache changes that ATOM depends on, such as LMCache/LMCache#5132 for #2250, cannot be used until LMCache's next tag. The nightly release is also deleted and republished every day, so its URL cannot be pinned.
How it works
lmcache_commitmust be a full 40-character SHA; branch names are rejected.publishdefaults to off, which builds and validates only.runnerisbuild-only-atomby default;linux-atom-mi35x-1additionally runs the GPU kernel check..github/scripts/build_rocm_torch210_wheel.shfrom the requested commit, inside the same digest-pinnedrocm/pytorch:rocm7.2.4_..._pytorch_release_2.10.0image that LMCache'sbuild_rocm_torch210_artifacts.ymluses. The build steps are not duplicated in ATOM.0.5.6.dev98+g05fc77a0.rocm7.2.4.torch2.10.git3d3aa833.cxx11abi1.validate_rocm_torch210_wheel.pychecks the exact torch/HIP/ROCm/CXX11 ABI and the wheel tag. On a GPU runner it also runs the HIP D2H/H2D kernels..github/scripts/validate_lmcache_wheel_for_atom.pyrequires the ATOM MP adapters,execute_object_group_transfer, and the native.somodules. It also parses--null-block-id -1 --separate-object-groupsthrough the MP server's own parser.ubuntu-latest, so the write token never reaches the self-hosted runner. It creates taglmcache-v<version>-g<sha8>-rocm-torch210as a pre-release that is not marked latest, so ATOM's own release keeps its place. It refuses to overwrite an existing tag, and the release notes include theARG LMCACHE_WHEEL_*lines to paste into the Dockerfiles. LMCache's Apache-2.0 LICENSE is included in the wheel'sdist-info.Validation
Ran the build job's
run:steps locally, read straight from the YAML, with LMCache at05fc77a0a7ababd9a7f2e343a771bc4bbc5b65cb:lmcache-0.5.6.dev98+g05fc77a0.rocm7.2.4.torch2.10.git3d3aa833.cxx11abi1-cp312-cp312-manylinux_2_39_x86_64.whlOK: ROCm torch 2.10 wheel ABI; ATOM adapters available ... hip 7.2.53211OK: lmcache 0.5.6.dev98+g05fc77a0... has the ATOM MP adapters and server flagsThe build job also passed on GitHub, on
build-only-atom, triggered by a temporary push trigger that has since been reverted: https://github.com/ROCm/ATOM/actions/runs/35982738885. That run producedlmcache-0.5.6.dev98+g05fc77a0...whl(sha256323ed34f...7be6) and both validators passed. The publish job was skipped, and it has not run yet; it first runs on the post-mergeworkflow_dispatchwithpublish=true.Follow-up
Once this is merged, dispatch it with
05fc77a0a7ababd9a7f2e343a771bc4bbc5b65cbandpublish=true, then pin the resulting release indocker/Dockerfileanddocker/atom_release.dockerfilefor #2250.🤖 Generated with Claude Code