Skip to content

Commit a450bb0

Browse files
committed
Merge branch 'rocm-main' into ci-upstream-sync-34_1
2 parents 355589f + 8607cb6 commit a450bb0

File tree

4 files changed

+98
-16
lines changed

4 files changed

+98
-16
lines changed

.github/workflows/ci-build.yaml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: ROCm CPU CI
22

33
# We test all supported Python versions as follows:
44
# - 3.10 : Documentation build
@@ -11,10 +11,10 @@ on:
1111
# but only for the main branch
1212
push:
1313
branches:
14-
- main
14+
- rocm-main
1515
pull_request:
1616
branches:
17-
- main
17+
- rocm-main
1818

1919
permissions:
2020
contents: read # to fetch code
@@ -43,9 +43,7 @@ jobs:
4343

4444
build:
4545
name: "build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ubuntu-20.04, x64=${{ matrix.enable-x64}})"
46-
runs-on: linux-x86-n2-32
47-
container:
48-
image: index.docker.io/library/ubuntu@sha256:6d8d9799fe6ab3221965efac00b4c34a2bcc102c086a58dff9e19a08b913c7ef # ratchet:ubuntu:20.04
46+
runs-on: ROCM-Ubuntu
4947
timeout-minutes: 60
5048
strategy:
5149
matrix:
@@ -63,10 +61,6 @@ jobs:
6361
num_generated_cases: 1
6462
steps:
6563
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
66-
- name: Image Setup
67-
run: |
68-
apt update
69-
apt install -y libssl-dev
7064
- name: Set up Python ${{ matrix.python-version }}
7165
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
7266
with:
@@ -222,9 +216,7 @@ jobs:
222216
223217
ffi:
224218
name: FFI example
225-
runs-on: linux-x86-g2-16-l4-1gpu
226-
container:
227-
image: index.docker.io/tensorflow/build:latest-python3.12@sha256:48e99608fe9434ada5b14e19fdfd8e64f4cfc83aacd328b9c2101b210e984295 # ratchet:index.docker.io/tensorflow/build:latest-python3.12
219+
runs-on: ROCM-Ubuntu
228220
timeout-minutes: 30
229221
steps:
230222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -243,7 +235,7 @@ jobs:
243235
path: ${{ steps.pip-cache.outputs.dir }}
244236
key: ${{ runner.os }}-pip-ffi-examples-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt', 'examples/**/pyproject.toml') }}
245237
- name: Install JAX
246-
run: pip install .[cuda12]
238+
run: pip install .
247239
- name: Build and install example project
248240
run: python -m pip install -v ./examples/ffi[test]
249241
env:
@@ -252,7 +244,7 @@ jobs:
252244
# a different toolchain. GCC is the default compiler on the
253245
# 'ubuntu-latest' runner, but we still set this explicitly just to be
254246
# clear.
255-
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=g++ -DJAX_FFI_EXAMPLE_ENABLE_CUDA=ON
247+
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=g++ #-DJAX_FFI_EXAMPLE_ENABLE_CUDA=ON
256248
- name: Run CPU tests
257249
run: python -m pytest examples/ffi/tests
258250
env:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Pulls the latest changes from upstream into main and opens a PR to merge
2+
# them into rocm-main branch.
3+
4+
name: ROCm Nightly Upstream Sync
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 6 * * 1-5'
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
env:
13+
SYNC_BRANCH_NAME: ci-upstream-sync-${{ github.run_number }}_${{ github.run_attempt }}
14+
jobs:
15+
sync-main:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: |
19+
gh auth status
20+
gh repo sync rocm/jax -b main
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
create-sync-branch:
24+
needs: sync-main
25+
runs-on: ubuntu-latest
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
- name: Create branch
32+
run: |
33+
git fetch
34+
git checkout origin/main
35+
git checkout -b $SYNC_BRANCH_NAME
36+
# Try and merge rocm-main into this new branch so that we don't run upstream's CI code
37+
git config --global user.email "[email protected]"
38+
git config --global user.name "GitHub Actions"
39+
git merge origin/rocm-main || true
40+
# If the merge creates conflicts, we want to abort and push to origin anyways so that a dev can resolve the conflicts
41+
git merge --abort || true
42+
git push origin HEAD
43+
open-sync-pr:
44+
needs: create-sync-branch
45+
runs-on: ubuntu-latest
46+
steps:
47+
- run: |
48+
gh pr create --repo $GITHUB_REPOSITORY --head $SYNC_BRANCH_NAME --base rocm-main --title "CI: $(date +%x) upstream sync" --body "Daily sync with upstream"
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ROCm Open Upstream PR
2+
on:
3+
pull_request:
4+
types: [ labeled ]
5+
branches: [ rocm-main ]
6+
jobs:
7+
open-upstream:
8+
if: ${{ github.event.label.name == 'open-upstream' }}
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
outputs:
14+
new-pr-link: ${{ steps.create-pr.outputs.link }}
15+
env:
16+
NEW_BRANCH_NAME: "${{ github.head_ref }}-upstream"
17+
NEW_PR_TITLE: "[ROCM] ${{ github.event.pull_request.title }}"
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
- name: Rebase code to main
22+
run: |
23+
git checkout -b $NEW_BRANCH_NAME ${{ github.head_ref }}
24+
git rebase --onto main
25+
git push origin HEAD
26+
# TODO: Change the base of the PR to upstream main
27+
- name: Create a PR to upstream
28+
id: create-pr
29+
run: |
30+
echo link=$(gh pr create --repo rocm/jax --base main --head $NEW_BRANCH_NAME --title "$NEW_PR_TITLE" --body "${{ github.event.pull_request.body }}") >> "$GITHUB_OUTPUT"
31+
comment-link:
32+
needs: open-upstream
33+
permissions:
34+
pull-requests: write
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Leave comment on old PR
38+
run: gh pr comment ${{ github.event.pull_request.number }} --repo rocm/jax --body ${{ needs.open-upstream.outputs.new-pr-link.link }}
39+

.github/workflows/upstream-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222

2323
jobs:
2424
upstream-dev:
25-
runs-on: ubuntu-20.04-16core
25+
runs-on: ROCM-Ubuntu
2626
permissions:
2727
contents: read
2828
checks: write # for upload-artifact

0 commit comments

Comments
 (0)