Skip to content

Commit 472cb8d

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

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.ref }} # Checkout the PR branch
14+
15+
- name: Run update script
16+
run: |
17+
docker run -v ${{ github.workspace }}:/workspace -w /workspace maxtext-unit-test-tpu:py312 python3 tools/update_hlo_references.py
18+
19+
- name: Commit and Push changes
20+
run: |
21+
git config --global user.name "github-actions[bot]"
22+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
23+
git add tests/integration/reference_hlo.txt
24+
git commit -m "Update reference HLO from manual trigger"
25+
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)