Skip to content

Add docker image to use hermetic llvm and sysroot#782

Open
hsharsha wants to merge 8 commits into
amd-mainfrom
hhs/add_docker_for_jax_xla
Open

Add docker image to use hermetic llvm and sysroot#782
hsharsha wants to merge 8 commits into
amd-mainfrom
hhs/add_docker_for_jax_xla

Conversation

@hsharsha

Copy link
Copy Markdown

Add docker image to build and test JAX and XLA using hermetic llvm and sysroot based on ub22 image used for ml-build images

mminutoli and others added 4 commits May 29, 2026 16:31
Gate every caller workflow job by `github.repository_owner` so
that forks only run the CI subset they have infrastructure for.

Non-ROCm jobs: `github.repository_owner == 'jax-ml'`
ROCm jobs: `github.repository_owner == 'jax-ml' || github.repository_owner == 'ROCm'`
job naming, and nightly build workflow

Version-tier S3 artifact layout:
- Add rocm-release-version tier to S3 artifact
  paths to prevent wheel collisions across ROCm
  versions.
- Add per-repo/branch/version LATEST pointer for
  wheel resolution.
- Parameterize manylinux container image in
  build_rocm_artifacts.yml.
- Plumb s3_download_uri through bazel_rocm.yml.

Standardize CI job naming and matrix schema:
- Unify ROCm matrix entries across all caller
  workflows to use a canonical schema with label,
  wheel-version, release-version, and tag fields.
- Update job names to use matrix.rocm.label.
- Add rocm-release-version input to pytest_rocm,
  bazel_rocm, and download-jax-rocm-wheels to
  decouple wheel filename matching from S3 path
  construction.
- Add manylinux-image input to
  build_rocm_artifacts so callers can override
  the container image.

Nightly workflow:
- Add a dedicated build-rocm-artifacts job to
  the nightly workflow that builds wheels with
  pinned XLA (clone_main_xla: 0) and uploads to a
  nightly-specific S3 path.
- Update nightly pytest and bazel ROCm jobs to
  depend on the new build.
Extends the wheel test continuous and nightly release workflows to run
against TheRock 7.13.0 and TheRock latest builds in addition to ROCm 7.2.0.
@hsharsha

Copy link
Copy Markdown
Author

@mminutoli should we keep docker files here now that rocm-jax would be depricated. Or do we still want to keep all the infra related files there?

Comment thread .github/workflows/build_docker.yml Outdated
Comment on lines +56 to +57
run: |
working-directory: ./build/rocm/docker/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Probably a typo, it needs to be its own line. As it is now, the script will fail

Comment thread build/rocm/docker/setup.rocm.sh Outdated
# - jammy
# - el7
# - el8
set -x

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
set -x
set -euo pipefail
set -x

Comment thread .github/workflows/build_docker.yml Outdated

jobs:
build-docker:
runs-on: ${{ fromJSON(inputs.runner-label) }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
runs-on: ${{ fromJSON(inputs.runner-label) }}
runs-on: ${{ inputs.runner-label }}

Comment thread .github/workflows/build_docker.yml Outdated
required: false
default: 'plugin_wheels'
type: string
extra-cr-tag:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Defined, but never used

Comment thread .github/workflows/build_docker.yml Outdated
df -h
rocm-smi -a || true
rocminfo | grep gfx || true
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We should be using v6+ on actions/checkou or pinned hashes

Comment thread .github/workflows/build_docker.yml Outdated
rocminfo | grep gfx || true
- uses: actions/checkout@v4
- name: Download wheel artifacts
uses: actions/download-artifact@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same. Needs a relevant version and pinned hash

Comment thread build/rocm/docker/setup.rocm.sh Outdated
ROCM_DEB_REPO=${ROCM_DEB_REPO_HOME}${ROCM_VERS}/
AMDGPU_DEB_REPO=${AMDGPU_DEB_REPO_HOME}${AMDGPU_REPO_VERS}/

DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated update

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

git diff --check says there's a trailing whitspace

@i-chaochen

Copy link
Copy Markdown

do we need to put this to jax upstream? not sure what's sync policy in rocm/jax?

@hsharsha hsharsha changed the title Hhs/add docker for jax xla Add docker image to use hermetic llvm and sysroot Jun 1, 2026
@mminutoli

mminutoli commented Jun 1, 2026

Copy link
Copy Markdown

We keep our infra in another repository. So maybe we should close this PR and open one there.

Nevertheless, the right approach seems to have hermetic root in the build, right @alekstheod ?

@mminutoli mminutoli left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As said above, this should be closed IMHO.

@psanal35 psanal35 force-pushed the amd-main branch 2 times, most recently from 729ed31 to 88e42dc Compare June 18, 2026 21:18
@mminutoli mminutoli force-pushed the amd-main branch 2 times, most recently from cb097f7 to d347a4f Compare June 22, 2026 18:14
@mminutoli mminutoli force-pushed the amd-main branch 2 times, most recently from 3f9e8b4 to f25f2b4 Compare June 27, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants