Skip to content

Commit d247e90

Browse files
committed
Add update_reference.yml workflow for manual HLO updates
1 parent a6ceb18 commit d247e90

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update HLO Reference
2+
3+
on:
4+
workflow_dispatch: # This creates the "Run workflow" button
5+
6+
jobs:
7+
update-hlo:
8+
runs-on: ["linux-x86-ct6e-180-4tpu"] # Needs to be a TPU runner
9+
container:
10+
image: ubuntu:latest
11+
options: -v /var/run/docker.sock:/var/run/docker.sock
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.ref }} # Checkout the PR branch
17+
18+
- name: Install Docker CLI
19+
run: |
20+
apt update && apt install docker.io -y
21+
22+
- name: Run update script
23+
run: |
24+
docker run -v ${{ github.workspace }}:/workspace -w /workspace maxtext-unit-test-tpu:py312 python3 tools/update_hlo_references.py
25+
26+
- name: Commit and Push changes
27+
run: |
28+
git config --global user.name "github-actions[bot]"
29+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
30+
git add tests/integration/reference_hlo.txt
31+
git commit -m "Update reference HLO from manual trigger"
32+
git push

tests/integration/hlo_diff_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def filter_line(line):
1919
return None
2020
# line = STACK_FRAME_REGEX.sub("stack_frame_id=DUMMY", line)
2121
# line = SHARDING_REGEX.sub("S(DUMMY)", line)
22-
line = OP_NUM_REGEX.sub(".DUMMY", line)
22+
# line = OP_NUM_REGEX.sub(".DUMMY", line)
2323
# Normalize 'square' to 'mul' to ignore naming differences (e.g. %square.157 vs %mul.1252)
2424
# line = line.replace("square", "mul")
2525
return line

0 commit comments

Comments
 (0)