Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches:
- master
- 'release/*'
pull_request:
branches:
- master
- 'release/*'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSIONS: "3.10.13,3.12.8"

jobs:
call-build-wheels:
strategy:
matrix:
rocm-version: ["6.3.3"]
uses: jax/rocm-jax/.github/workflows/reuseable/build-wheels.yml@master
with:
python-versions: ${{ env.PYTHON_VERSIONS }}
rocm-version: ${{ matrix.rocm-version }}
call-build-docker:
strategy:
matrix:
python-version: ["3.10.13,3.12.8"]
rocm-version: ["6.3.3"]
uses: jax/rocm-jax/.github/workflows/reusable/build-docker.yml@master
with:
rocm-version: ${{ matrix.python-version }}
run-python-unit-tests:
strategy:
matrix:
rocm-version: ["6.3.3"]
steps:
- name: Checkout plugin repo
uses: actions/checkout@v4
- name: Checkout JAX repo
uses: actions/chekcout@v4
with:
repository: jax-ml/jax
path: jax
Comment on lines +44 to +48
Copy link
Contributor

Choose a reason for hiding this comment

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

What version of jax does it checkout? rocm-main?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tip of upstream main. We need to hammer out how we handle tests though. It'd be nice if we were just able to submit broken tests (where it's the test case's fault) to upstream if they merge them quickly. And we talked about doing a skip list somewhere, but I haven't actually made a go at implementing that yet. One option is to just put stuff in the skip list until upstream fixes it. We could also rely on rocm-main in rocm/jax, but then we need to keep up with our sync stuff.

- name: Run tests
env:
GPU_COUNT: "8"
GFX: "gfx90a"
ROCM_VERSION: ${{ matrix.rocm-version }}
run: |
python3 build/ci_build test "ghcr.io/rocm/jax-ubu22.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}" --test-cmd "pytest tests/core_test.py tests/linalg_test.py"

50 changes: 50 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Nightly

on:
schedule:
- cron: "0 1 * * *"

concurrency:
cancel-in-progress: true

env:
PYTHON_VERSIONS: "3.10.13,3.12.8"

jobs:
call-build-wheels:
strategy:
matrix:
rocm-version: ["6.3.3"]
uses: jax/rocm-jax/.github/workflows/reuseable/build-wheels.yml@master
with:
python-versions: ${{ env.PYTHON_VERSIONS }}
rocm-version: ${{ matrix.rocm-version }}
call-build-docker:
strategy:
matrix:
python-version: ["3.10.13,3.12.8"]
rocm-version: ["6.3.3"]
uses: jax/rocm-jax/.github/workflows/reusable/build-docker.yml@master
with:
rocm-version: ${{ matrix.python-version }}
run-python-unit-tests:
strategy:
matrix:
rocm-version: ["6.3.3"]
steps:
- name: Checkout plugin repo
uses: actions/checkout@v4
- name: Checkout JAX repo
uses: actions/chekcout@v4
with:
repository: jax-ml/jax
path: jax
- name: Run tests
env:
GPU_COUNT: "8"
GFX: "gfx90a"
ROCM_VERSION: ${{ matrix.rocm-version }}
run: |
python3 build/ci_build test "ghcr.io/rocm/jax-ubu22.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}" --test-cmd "pytest tests"


49 changes: 49 additions & 0 deletions .github/workflows/reusable/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build docker

on:
workflow_call:
inputs:
rocm-version:
required: true
type: string
artifact-prefix:
default: 'plugin_wheels'

jobs:
build-docker:
runs-on: mi-250
steps:
- name: Clean up old runs
run: |
ls
# Make sure that we own all of the files so that we have permissions to delete them
docker run -v "./:/rocm-jax" ubuntu /bin/bash -c "chown -R $UID /rocm-jax/* || true"
# Remove any old work directories from this machine
rm -rf * || true
ls
- name: Print system info
run: |
whoami
printenv
df -h
- uses: actions/checkout@v4
- name: Download wheel artifacts
uses: actions/download-artifacts@v4
name: ${{ inputs.artifact-prefix }}_r${{ inputs.rocm-version }}
path: ./wheelhouse
- name: Build JAX docker image
run: |
python3 build/ci_build \
--rocm-version ${{ inputs.rocm-version }}
build_dockers
- name: Authenticate to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push docker images
env:
ROCM_VERSION: ${{ inputs.rocm-version }}
run: |
docker tag "jax-ubu22.rocm${ROCM_VERSION//.}" "ghcr.io/rocm/jax-ubu22.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}"
docker tag "jax-ubu24.rocm${ROCM_VERSION//.}" "ghcr.io/rocm/jax-ubu24.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}"
docker push "ghcr.io/rocm/jax-ubu22.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}"
docker push "ghcr.io/rocm/jax-ubu24.rocm${ROCM_VERSION//.}:${GITHUB_REF_NAME}"

44 changes: 44 additions & 0 deletions .github/workflows/reusable/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build wheels

on:
workflow_call:
inputs:
python-versions:
required: true
type: string
rocm-version:
required: true
type: string
artifact-prefix:
default: 'plugin_wheels'

build-plugin-docker:
runs-on: mi-250
steps:
- name: Clean up old runs
run: |
ls
# Make sure that we own all of the files so that we have permissions to delete them
docker run -v "./:/rocm-jax" ubuntu /bin/bash -c "chown -R $UID /rocm-jax/* || true"
# Remove any old work directories from this machine
rm -rf * || true
ls
- name: Print system info
run: |
whoami
printenv
df -h
- uses: actions/checkout@v4
- name: Build plugin wheels
run: |
python3 build/ci_build \
--compiler clang \
--python-versions ${{ inputs.python-versions }} \
--rocm-version ${{ inputs.rocm-version }} \
dist_wheels
- name: Archive plugin wheels
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-prefix }}_r${{ env.ROCM_VERSION }}
path: ./wheelhouse/*.whl