Skip to content

Commit d68d824

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

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Update HLO Reference
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-hlo:
10+
runs-on: ["linux-x86-ct6e-180-4tpu"] # Needs to be a TPU runner
11+
container:
12+
image: maxtext-unit-test-tpu:py312 # Same image as CI tests
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.ref }} # Checkout the PR branch
18+
19+
- name: Run update script
20+
run: |
21+
python3 tools/update_hlo_references.py
22+
23+
- name: Commit and Push changes
24+
run: |
25+
git config --global user.name "github-actions[bot]"
26+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
27+
git add tests/integration/reference_hlo.txt
28+
git commit -m "Update reference HLO from PR trigger"
29+
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)