Skip to content

fix(jax): match jax_rocm plugin wheels by ROCm major version - #6956

Merged
gulsumgudukbay merged 1 commit into
mainfrom
users/marifamd/fix-jax-rocm-plugin-version
Jul 29, 2026
Merged

fix(jax): match jax_rocm plugin wheels by ROCm major version#6956
gulsumgudukbay merged 1 commit into
mainfrom
users/marifamd/fix-jax-rocm-plugin-version

Conversation

@marifamd

Copy link
Copy Markdown
Contributor

Summary

The JAX multi-arch build fails at the version-detection step with:

FileNotFoundError: Did not find jax_rocm7_plugin wheel

build_tools/github_actions/write_jax_versions.py hardcodes jax_rocm7_plugin and jax_rocm7_pjrt, but the JAX 0.10.0 build now emits jax_rocm10_plugin / jax_rocm10_pjrt. The ROCm major version embedded in the wheel name tracks the ROCm release, so a fixed 7 no longer matches.

Fix

Detect the wheels with a jax_rocm*_plugin / jax_rocm*_pjrt glob so the step tracks whatever ROCm major version the build produces (rocm7, rocm10, and future), instead of a hardcoded major. Docstring and error messages updated to match.

Scope

Limited to the failing build-time detection logic. The other jax_rocm7_* references live in the promotion/download allowlists (download_python_packages.py, promote_packages.py, s3_management/manage.py), which are separate jobs and intentionally explicit; they are left out of this change.

Test

  • pre-commit run --files build_tools/github_actions/write_jax_versions.py passes (black, etc.).
  • Glob verified locally against real 0.10.0 wheel names: jax_rocm*_plugin-*.whl matches jax_rocm10_plugin-0.10.0+devrocm10.0.0-...whl while the old jax_rocm7_plugin-*.whl matches nothing (reproducing the failure).

CI

This is a CI script change; the JAX build job exercises it.

The JAX version-detection step hardcoded jax_rocm7_plugin and
jax_rocm7_pjrt. JAX 0.10.0 emits jax_rocm10_* wheels, so the build
failed with 'Did not find jax_rocm7_plugin wheel'. Match the wheels
with a jax_rocm*_plugin / jax_rocm*_pjrt glob so detection tracks the
ROCm major version instead of a fixed one.

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
@therock-pr-bot

therock-pr-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Title/Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
JIRA ID (on separate line)
ROCM-25757
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID (on separate line)
AIRUNTIME-2352
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ❌ Fail Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: build_tools/github_actions/write_jax_versions.py; no test file found
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 2 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description
  • ❌ Unit Test

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 29, 2026
@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description
  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@marifamd
marifamd requested a review from gulsumgudukbay July 29, 2026 07:40
@amd-chiranjeevi

Copy link
Copy Markdown
Contributor

will this solution work for jax v0.9.1..
whl generated here has the prefix jax_rocm1_plugin
https://github.com/ROCm/rockrel/actions/runs/30419729909/job/90473961488#step:9:16375

@marifamd

marifamd commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Resolves fails in #6960

@gulsumgudukbay gulsumgudukbay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The jax_rocm1_* naming only happens on the 0.9.1 path. That branch builds through ROCm/rocm-jax's wrapper, which passes the truncated value straight through:

build/build.py build --wheels=jax-rocm-plugin --rocm_path=/opt/rocm-10.0.0a20260729 --rocm_version=1 ...
The 0.10.0 path never passes --rocm_version at all and it derives the namespace inside the JAX build from ROCM_PATH via rocm-sdk path --root, which is why it correctly produces jax_rocm10_. Since #6708 leaves the release set at 0.10.0 through 0.11.0 and deletes the native flow, the only code path that can emit jax_rocm1_ goes away with it.

@gulsumgudukbay

Copy link
Copy Markdown
Contributor

This fix is necessary but not sufficient, test_linux_jax_wheels_partial.yml:240 and test_linux_jax_wheels.yml:253 still pip install "jax_rocm7_plugin==...", plus the allowlists in download_python_packages.py, s3_management/manage.py, and promote_packages.py, so the build will go green and the next stage will fail. Second, the small robustness point: get_wheel_version takes wheel_paths[0] in filesystem order when the glob matches more than one wheel, so sorting or validating the major against the ROCm version would make it deterministic.

@gulsumgudukbay
gulsumgudukbay merged commit 9be1972 into main Jul 29, 2026
176 of 192 checks passed
@gulsumgudukbay
gulsumgudukbay deleted the users/marifamd/fix-jax-rocm-plugin-version branch July 29, 2026 16:07
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Jul 29, 2026
gulsumgudukbay added a commit that referenced this pull request Jul 29, 2026
Issue: #6958
## Motivation
The JAX plugin/pjrt wheels embed the ROCm major version in their package
name (`jax_rocm7_plugin` for ROCm 7, `jax_rocm10_plugin` for ROCm 10).
Now that `version.json` is at 10.0.0, the builds emit `jax_rocm10_*`,
but everything
downstream of the build still hardcodes the ROCm 7 spelling: the test
job can't resolve the package, and the promotion/index allowlists
silently drop the wheels.

#6956 fixes detection at build time. This fixes the consumers.

## Changes
- `test_linux_jax_wheels.yml`, `test_linux_jax_wheels_partial.yml`:
derive the package name from `rocm_version` instead of installing a
literal `jax_rocm7_plugin`. Fails fast if `rocm_version` is empty.
- `download_python_packages.py`, `promote_packages.py`: match the wheels
with a `^jax_rocm\d+_(plugin|pjrt)$` pattern instead of listing them
once per ROCm release.
- `s3_management/manage.py`: allow the wheels into the package index by
prefix, alongside the existing `rocm_sdk_device_` / `amd_torch_device`
cases.

## Test Plan
New `build_tools/packaging/tests/download_python_packages_test.py` 7
passed.
Package recognition, before vs after:

| wheel | before | after |
| --- | --- | --- |
| `jax_rocm7_plugin-0.9.2+rocm7.15.0-…` | `promote`, allowed |
`promote`, allowed |
| `jax_rocm10_plugin-0.10.0+rocm10.0.0-…` | `unknown`, **not** allowed |
`promote`, allowed |

Name derivation, against real version strings:
```console
rocm_version='10.0.0'          -> jax_rocm10_plugin
rocm_version='10.0.0a20260729' -> jax_rocm10_plugin
rocm_version='7.15.0'          -> jax_rocm7_plugin
rocm_version='7.15.0.dev0+abc' -> jax_rocm7_plugin
rocm_version=''                -> error (fail fast)
```

## Test Results

```console
$ python3 -m pytest build_tools/packaging/tests/download_python_packages_test.py -v
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/ggudukba/JAX/th-jaxpkg/build_tools
configfile: pyproject.toml
collected 7 items
CategorizePackageTest::test_jax_rocm10_wheels_are_promoted PASSED         [ 14%]
CategorizePackageTest::test_jax_rocm7_wheels_are_promoted PASSED          [ 28%]
CategorizePackageTest::test_jaxlib_is_still_promoted PASSED               [ 42%]
CategorizePackageTest::test_unrelated_jax_rocm_name_is_unknown PASSED     [ 57%]
IsAllowedMultiArchPackageTest::test_jax_rocm10_wheels_are_allowed PASSED  [ 71%]
IsAllowedMultiArchPackageTest::test_jax_rocm7_wheels_are_allowed PASSED   [ 85%]
IsAllowedMultiArchPackageTest::test_unknown_package_is_not_allowed PASSED [100%]
===================== 7 passed, 8 subtests passed in 0.06s =====================
```
## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants