Repository navigation
Conversation
…s.txt pip install "verl-hardware-plugin[xpu]" (also enflame, iluvatar, metax, mlu, musa, neuron, rocm, supa, tpu) now resolves the pins in verl_hardware_plugin/accelerators/<backend>/requirements.txt, so each backend owns its own dependencies and a version bump touches only that backend's file. [vllm-xpu] adds the vLLM XPU wheel pin. The dev extra moves to requirements-dev.txt unchanged. XPU gets real pins (torch==2.14.0+xpu, dpctl, kernels>=0.16.0,<0.17.0, vllm==0.32.0+xpu). The other backends ship comment-only placeholders for their maintainers; their torch builds normally come from a vendor image. Index flags cannot live in package metadata, so requirements files hold pins only. tests/test_vendor_extras.py rejects option lines, direct URLs and a backend without an extra.
Adds Option B (pip extras) to the XPU install guide with the system packages and environment variables pip cannot provide (libnuma-dev, LD_LIBRARY_PATH for oneCCL, CCL_SYCL_*_TMP_BUF). Option B from source becomes Option C.
Runs on pull requests that touch pyproject.toml or an accelerator requirements file, weekly, and by hand. The metadata job checks every backend has a Provides-Extra; resolve-xpu runs pip install --dry-run against the real indexes.
… hand verify_extras.sh builds the wheel and prints PASS/FAIL lines (no GPU; --resolve asks the real indexes). smoke_xpu.sh runs on an Intel GPU machine and checks torch, the GPU, the entry point and the platform.
…lishing) Builds sdist and wheel, runs twine check, publishes on a vX.Y.Z tag that matches pyproject. Needs a PyPI pending publisher and a pypi environment before it can publish; until then a manual run only builds.
Follows the repo layout for per-backend scripts (scripts/accelerators/<backend>/). verify_extras.sh stays in scripts/ because it checks every backend.
A workflow_dispatch run started on a v* tag has github.ref refs/tags/v..., so the ref check alone let a build-only manual run reach the publish job. Require event_name == push as well.
The vLLM check was skipped whenever 'import vllm' failed, so a wheel with a missing shared library or an incompatible dependency could end in ALL PASS. Skip only when vllm is not installed, and run the import inside the check.
Follows verl #8863. Adds the vllm-xpu-kernels index, which the vLLM wheel pins exactly and no other index carries.
verl main's Dockerfile.stable.vllm still builds torch 2.14.0+xpu and vLLM 0.32.0 with compute-runtime 26.27 from release packages; the 2.15.0 / 0.34.0 / OMIX image is verl PR #8863, still open. Say so, drop the 'recommended' label and the vllm034 tag, and point to Options B and C for the stack in this guide.
…tors/<backend>/ Each backend's pip-extra requirements file now sits next to its install guide (docs/accelerators/<backend>/requirements.txt) instead of inside the Python package. pyproject.toml maps every extra to that path; MLU keeps its existing docs/accelerators/mlu/requirements_mlu.txt untouched and the mlu extra reads it, so there is one list and nothing to drift. The wheel no longer carries the requirements files (its metadata already holds the dependencies); the sdist does, so a wheel built from the sdist keeps the same extras. Updates the extras.yml path filter, verify_extras.sh, the install guides, the README and the comments and docstrings that named the old location. test_vendor_extras.py also checks that every extra's file lives in docs/accelerators/<backend>/ (vllm-xpu in xpu/). Resolved as a dry-run against verl (not run on MLU hardware): with verl main at 8612d02 and only the base requirements the MLU file resolves; it does not resolve with verl[verl-core] at that commit (TransferQueue==0.1.11 vs >=0.1.12) or with PyPI verl 0.9.1 (transformers==5.15.0 vs <5.11). The MLU maintainers should review those pins.
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.
What does this PR do?
Lets each hardware backend declare its own pip dependencies, as a pip extra:
Each backend owns
verl_hardware_plugin/accelerators/<backend>/requirements.txt.pyproject.tomlmaps the extra to thatfile (
[tool.setuptools.dynamic.optional-dependencies]). A backend changes its pins by editing its own file; it nevertouches another backend's pins or the shared
pyproject.toml.torch==2.15.0+xpu,dpctl,kernels>=0.16.0,<0.17.0.[vllm-xpu]addsvllm==0.34.0+xpu(
requirements-vllm.txt). These match verl's XPU Docker image after #8863 (vLLM 0.34.0, torch 2.15.0).[mlu]etc. are valid extras that install nothingextra. Their torch build normally comes from a vendor image, and none of their packages were verified here.
Each backend's maintainers are asked to fill in their own file (see "Asks" below).
devextra moves torequirements-dev.txt, same contents.Why
The goal is a single-command install per vendor, with each vendor owning its dependency list. This PR delivers the
ownership model, the XPU pins, the checks that keep them honest, and the docs. It does not yet deliver the
one-command install, for the reasons in the next section.
Where this stands against the one-command goal
verl[verl-core] @ git+...@<commit>transformers<5.11; vLLM 0.34.0+xpu needs>=5.16.1,<5.23(verl PR #8390, merged 2026-10-26, is not in a release)pip install ".[...]"--extra-index-urlflags+xpuwheels are not on PyPI, andvllm-xpu-kernels(pinned exactly by the vLLM wheel) is only on its own indexuvindex entries, or anxpuextra in verl coreLD_LIBRARY_PATH,CCL_SYCL_*_TMP_BUF=1The earlier "released track" idea (verl 0.9.1 with an older vLLM) is dropped from this PR. It was only resolved, never
run, and it targeted vLLM 0.31, not the 0.34 pinned here.
Plan
pip install "verl-hardware-plugin[xpu,vllm-xpu]"plus four flagspip install "verl[xpu]"oruv sync --extra xpuxpuextra and index entries in itspyproject.tomlAsks for the maintainers
verl-hardware-plugin(the name has not been checkedfor availability), add a pending trusted publisher (owner
verl-project, workflowrelease.yml, environmentpypi),and create the
pypienvironment, optionally with a required reviewer. Until thenrelease.ymlonly builds.verlin the plugin's own dependencies: keepverl>=0.9.0, or depend onverl[verl-core]so aplain install also gets
TransferQueue,pyzmqandmathruler? This changes a shared dependency, so it is leftfor the maintainers to decide.
xpuextra (torch and vLLM+xpupins) plus[tool.uv.index]entries for thePyTorch XPU, vLLM XPU and vllm-xpu-kernels indexes in verl's
pyproject.tomlbe acceptable? That is what makesverl[xpu]possible.accelerators/<backend>/requirements.txtwith public,pip-installable pins, and put index flags and system packages in
docs/accelerators/<backend>/.BAAIlicense header on the new test file (used because the other XPU files use it and thechecker accepts it); whether
release.yml(the release-workflow commit) belongs in this PR; commit titles, whichcarry no backend tag because the change spans all backends.
The commits
Split so any of them can be dropped:
feat: per-backend pip extras ...pyproject.toml, the requirements files,tests/test_vendor_extras.pydocs: pip extras install option ...ci: build the wheel and resolve the XPU pins ....github/workflows/extras.ymlscripts: verify_extras.sh and smoke_xpu.sh ...ci: release workflow ....github/workflows/release.yml, PyPI trusted publishing on avX.Y.Ztagxpu: move pins to torch 2.15.0+xpu and vLLM 0.34.0+xpuTest
Resolve check (torch 2.15 / vLLM 0.34 update):
pip install --dry-runofverl[verl-core]at verl main(
8612d02) plus.[xpu,vllm-xpu]with the four index flags resolves totorch 2.15.0+xpu,vllm 0.34.0+xpu,vllm-xpu-kernels 0.1.17andtransformers 5.18.0.pytest tests/test_vendor_extras.py: 15 passed.GitHub CI:
lint,pytest,tpu-loss-core-shaand the twoExtrasjobs (metadata: wheel builds,twine check,every backend has a
Provides-Extra;resolve-xpu: the XPU pins resolve against the real indexes). Status for thelatest push: .
On hardware (not yet re-run on the 2.15 / 0.34 pins): the earlier version of this PR was run on 2x Intel Arc Pro B60
via devctl from a bare
intel/pytorch:xpu-2.13.0-ubuntu24.04image with torch 2.14.0+xpu and vLLM 0.32.0+xpu: cleanpip check, plugin activated from theverl.pluginsentry point, and a 2-step GRPO (Qwen2.5-0.5B, GSM8K, 2 GPUs)exited 0. That run checks the install path, not training quality. verl #8863 reports the same GRPO passing on
torch 2.15.0 / vLLM 0.34.0 from its Docker image, but the pip path here has not been run on that stack yet.
Not tested:
release.ymlhas not run (it needs avX.Y.Ztag and the PyPI setup), so no upload was attempted.The non-XPU extras are empty. sglang, torchtitan and veomni extras are not part of this PR.
Usage
How a backend changes its dependencies
verl_hardware_plugin/accelerators/<backend>/requirements.txt(pins only, no--index-urllines).docs/accelerators/<backend>/.pytest tests/test_vendor_extras.py.extras.ymlruns because a requirements file changed.