Skip to content

Commit af46e4a

Browse files
committed
Add TPU7x specific CI test workflows
1 parent f2917ee commit af46e4a

3 files changed

Lines changed: 47 additions & 7 deletions

File tree

.github/workflows/ci_pipeline.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,21 @@ jobs:
169169
is_scheduled_run: ${{ github.event_name == 'schedule' }}
170170
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
171171

172+
tpu7x-tests:
173+
name: ${{ matrix.flavor || 'TPU7X' }} tests
174+
needs: [build_and_upload_maxtext_package]
175+
if: needs.analyze_code_changes.outputs.run_tests == 'true' && github.ref == 'refs/heads/main' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
176+
uses: ./.github/workflows/run_tests_coordinator.yml
177+
strategy:
178+
fail-fast: false
179+
matrix:
180+
flavor: [tpu7x-unit, tpu7x-integration, tpu7x-post-training-unit]
181+
with:
182+
flavor: ${{ matrix.flavor }}
183+
base_image: maxtext-unit-test-tpu:py312
184+
is_scheduled_run: ${{ github.event_name == 'schedule' }}
185+
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
186+
172187
gpu-tests:
173188
name: ${{ matrix.flavor || 'GPU' }} tests
174189
needs: [build_and_upload_maxtext_package]
@@ -220,6 +235,7 @@ jobs:
220235

221236
maxtext_tpu_pathways_integration_tests:
222237
needs: build_and_upload_maxtext_package
238+
if: needs.analyze_code_changes.outputs.run_tests == 'true'
223239
uses: ./.github/workflows/run_pathways_tests.yml
224240
strategy:
225241
fail-fast: false
@@ -304,7 +320,7 @@ jobs:
304320

305321
notify_failure:
306322
name: Notify failed build # creates an issue or modifies last open existing issue for failed build
307-
needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests]
323+
needs: [tpu-tests, tpu7x-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests]
308324
if: ${{ always() }}
309325
runs-on: ubuntu-latest
310326
permissions:
@@ -318,7 +334,7 @@ jobs:
318334

319335
investigate_failure:
320336
name: Investigate failed build # investigates failure of scheduled run and comments on tracking issue
321-
needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, notify_failure]
337+
needs: [tpu-tests, tpu7x-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, notify_failure]
322338
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }}
323339
uses: ./.github/workflows/gemini_investigate.yml
324340
permissions:

.github/workflows/run_tests_coordinator.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ on:
2525
Test flavor (
2626
tpu-unit, tpu-integration,
2727
tpu-post-training-unit, tpu-post-training-integration,
28+
tpu7x-unit, tpu7x-integration,
29+
tpu7x-post-training-unit, tpu7x-post-training-integration,
2830
gpu-unit, gpu-integration,
2931
cpu-unit,
3032
cpu-post-training-unit
@@ -77,6 +79,10 @@ jobs:
7779
"tpu-integration": "tpu",
7880
"tpu-post-training-unit": "tpu",
7981
"tpu-post-training-integration": "tpu",
82+
"tpu7x-unit": "tpu",
83+
"tpu7x-integration": "tpu",
84+
"tpu7x-post-training-unit": "tpu",
85+
"tpu7x-post-training-integration": "tpu",
8086
"gpu-unit": "cuda12",
8187
"gpu-integration": "cuda12",
8288
"cpu-unit": "cpu",
@@ -89,6 +95,10 @@ jobs:
8995
"tpu-integration": "v6e-4",
9096
"tpu-post-training-unit": "v6e-4",
9197
"tpu-post-training-integration": "v6e-4",
98+
"tpu7x-unit": "tpu7x-8",
99+
"tpu7x-integration": "tpu7x-8",
100+
"tpu7x-post-training-unit": "tpu7x-8",
101+
"tpu7x-post-training-integration": "tpu7x-8",
92102
"gpu-unit": "a100-40gb-4",
93103
"gpu-integration": "a100-40gb-4",
94104
"cpu-unit": "X64",
@@ -101,6 +111,10 @@ jobs:
101111
"tpu-integration": "linux-x86-ct6e-180-4tpu",
102112
"tpu-post-training-unit": "linux-x86-ct6e-180-4tpu",
103113
"tpu-post-training-integration": "linux-x86-ct6e-180-4tpu",
114+
"tpu7x-unit": "linux-x86-tpu7x-224-4tpu",
115+
"tpu7x-integration": "linux-x86-tpu7x-224-4tpu",
116+
"tpu7x-post-training-unit": "linux-x86-tpu7x-224-4tpu",
117+
"tpu7x-post-training-integration": "linux-x86-tpu7x-224-4tpu",
104118
"gpu-unit": "linux-x86-a2-48-a100-4gpu",
105119
"gpu-integration": "linux-x86-a2-48-a100-4gpu",
106120
"cpu-unit": "linux-x86-n2-32",
@@ -113,6 +127,10 @@ jobs:
113127
"tpu-integration": "not cpu_only and not gpu_only and integration_test and not post_training",
114128
"tpu-post-training-unit": "not cpu_only and not gpu_only and not integration_test and post_training",
115129
"tpu-post-training-integration": "not cpu_only and not gpu_only and integration_test",
130+
"tpu7x-unit": "not cpu_only and not gpu_only and not integration_test and not post_training",
131+
"tpu7x-integration": "not cpu_only and not gpu_only and integration_test and not post_training",
132+
"tpu7x-post-training-unit": "not cpu_only and not gpu_only and not integration_test and post_training",
133+
"tpu7x-post-training-integration": "not cpu_only and not gpu_only and integration_test",
116134
"gpu-unit": "not cpu_only and not tpu_only and not integration_test and not post_training",
117135
"gpu-integration": "not cpu_only and not tpu_only and integration_test and not post_training",
118136
"cpu-unit": "cpu_only and not post_training",
@@ -125,6 +143,10 @@ jobs:
125143
"tpu-integration": "",
126144
"tpu-post-training-unit": "tests/post_training/unit tests/unit",
127145
"tpu-post-training-integration": "tests/post_training/integration",
146+
"tpu7x-unit": "",
147+
"tpu7x-integration": "",
148+
"tpu7x-post-training-unit": "tests/post_training/unit tests/unit",
149+
"tpu7x-post-training-integration": "tests/post_training/integration",
128150
"gpu-unit": "",
129151
"gpu-integration": "",
130152
"cpu-unit": "",
@@ -137,6 +159,10 @@ jobs:
137159
"tpu-integration": "--ignore=tests/post_training",
138160
"tpu-post-training-unit": "",
139161
"tpu-post-training-integration": "",
162+
"tpu7x-unit": "--ignore=tests/post_training --ignore=tests/inference/kvcache_test.py",
163+
"tpu7x-integration": "--ignore=tests/post_training",
164+
"tpu7x-post-training-unit": "",
165+
"tpu7x-post-training-integration": "",
140166
"gpu-unit": "--ignore=tests/post_training",
141167
"gpu-integration": "--ignore=tests/post_training",
142168
"cpu-unit": "--ignore=tests/post_training",

tests/integration/train_tests.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030
)
3131

3232

33-
def _small_model_base_emb_dim(decoupled, device_count):
34-
"""Return a tiny embedding dim divisible by local decoupled devices."""
35-
if not decoupled:
36-
return 28
33+
def _small_model_base_emb_dim(device_count):
34+
"""Return a tiny embedding dim divisible by local devices."""
3735
return ((28 + device_count - 1) // device_count) * device_count
3836

3937

@@ -46,7 +44,7 @@ class TrainTests(unittest.TestCase):
4644
dataset_path = get_test_dataset_path()
4745

4846
_small_model_overrides = [
49-
f"base_emb_dim={_small_model_base_emb_dim(decoupled, dev_count)}",
47+
f"base_emb_dim={_small_model_base_emb_dim(dev_count)}",
5048
"base_num_query_heads=4",
5149
"base_num_kv_heads=4",
5250
"base_mlp_dim=32",

0 commit comments

Comments
 (0)