Skip to content

Commit 20c5c71

Browse files
author
GitHub Actions
committed
Merge remote-tracking branch 'origin/rocm-main' into ci-upstream-sync-55_1
2 parents e6d6c4e + f04f164 commit 20c5c71

File tree

4 files changed

+103
-25
lines changed

4 files changed

+103
-25
lines changed

.github/workflows/ci-build.yaml

Lines changed: 10 additions & 24 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:
@@ -107,7 +101,7 @@ jobs:
107101
108102
documentation:
109103
name: Documentation - test code snippets
110-
runs-on: ubuntu-latest
104+
runs-on: ROCM-Ubuntu
111105
timeout-minutes: 10
112106
strategy:
113107
matrix:
@@ -144,19 +138,13 @@ jobs:
144138
145139
documentation_render:
146140
name: Documentation - render documentation
147-
runs-on: linux-x86-n2-16
148-
container:
149-
image: index.docker.io/library/ubuntu@sha256:6d8d9799fe6ab3221965efac00b4c34a2bcc102c086a58dff9e19a08b913c7ef # ratchet:ubuntu:20.04
150-
timeout-minutes: 10
141+
runs-on: ubuntu-latest
142+
timeout-minutes: 20
151143
strategy:
152144
matrix:
153145
python-version: ['3.10']
154146
steps:
155147
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
156-
- name: Image Setup
157-
run: |
158-
apt update
159-
apt install -y libssl-dev libsqlite3-dev
160148
- name: Set up Python ${{ matrix.python-version }}
161149
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
162150
with:
@@ -227,9 +215,7 @@ jobs:
227215
228216
ffi:
229217
name: FFI example
230-
runs-on: linux-x86-g2-16-l4-1gpu
231-
container:
232-
image: index.docker.io/tensorflow/build:latest-python3.12@sha256:48e99608fe9434ada5b14e19fdfd8e64f4cfc83aacd328b9c2101b210e984295 # ratchet:index.docker.io/tensorflow/build:latest-python3.12
218+
runs-on: ROCM-Ubuntu
233219
timeout-minutes: 30
234220
steps:
235221
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -248,7 +234,7 @@ jobs:
248234
path: ${{ steps.pip-cache.outputs.dir }}
249235
key: ${{ runner.os }}-pip-ffi-examples-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt', 'examples/**/pyproject.toml') }}
250236
- name: Install JAX
251-
run: pip install .[cuda12]
237+
run: pip install .
252238
- name: Build and install example project
253239
run: python -m pip install -v ./examples/ffi[test]
254240
env:
@@ -257,7 +243,7 @@ jobs:
257243
# a different toolchain. GCC is the default compiler on the
258244
# 'ubuntu-latest' runner, but we still set this explicitly just to be
259245
# clear.
260-
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=g++ -DJAX_FFI_EXAMPLE_ENABLE_CUDA=ON
246+
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=g++ #-DJAX_FFI_EXAMPLE_ENABLE_CUDA=ON
261247
- name: Run CPU tests
262248
run: python -m pytest examples/ffi/tests
263249
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
env:
14+
NEW_BRANCH_NAME: "${{ github.head_ref }}-upstream"
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- name: Rebase code to main
19+
run: |
20+
git config --global user.email "[email protected]"
21+
git config --global user.name "Github Actions"
22+
git fetch
23+
git checkout -b $NEW_BRANCH_NAME origin/${{ github.head_ref }}
24+
git rebase --onto origin/main origin/rocm-main
25+
# Force push here so that we don't run into conflicts with the origin branch
26+
git push origin HEAD --force
27+
- name: Leave link to create PR
28+
env:
29+
GH_TOKEN: ${{ github.token }}
30+
run: |
31+
# Bash is not friendly with newline characters, so make our own
32+
NL=$'\n'
33+
# Encode the PR title and body for passing as URL get parameters
34+
TITLE_ENC=$(jq -rn --arg x "[ROCm] ${{ github.event.pull_request.title }}" '$x|@uri')
35+
BODY_ENC=$(jq -rn --arg x $"${{ github.event.pull_request.body }}${NL}${NL}Created from: rocm/jax#${{ github.event.pull_request.number }}" '$x|@uri')
36+
# Create a link to the that will open up a new PR form to upstream and autofill the fields
37+
CREATE_PR_LINK="https://github.com/jax-ml/jax/compare/main...ROCm:jax:$NEW_BRANCH_NAME?expand=1&title=$TITLE_ENC&body=$BODY_ENC"
38+
# Add a comment with the link to the PR
39+
COMMENT_BODY="Feature branch from main is ready. [Create a new PR][1] destined for upstream?${NL}${NL}[1]: $CREATE_PR_LINK"
40+
gh pr comment ${{ github.event.pull_request.number }} --repo rocm/jax --body "$COMMENT_BODY"
41+

.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)