Add TPU7x specific CI test workflows#4294
Open
darisoy wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1d26c33 to
9910c25
Compare
igorts-git
approved these changes
Jun 29, 2026
9910c25 to
aea293a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates automated GitHub Actions CI test suites for Google's newly available TPU v7x runner fleet (
linux-x86-tpu7x-224-4tpu), establishing parity with our existing TPU (v6e-4), GPU, and CPU continuous integration pipelines.Motivation & Problem Solved
device_count == 4). Onboarding TPU7X introduces 4-chip VMs exposing 2 TensorCores per chip (device_count == 8), enabling continuous testing of 8-way sharding meshes and preventing regressions on v7x hardware.tests/integration/train_tests.py, simulated small model tests hardcodedbase_emb_dim = 28when non-decoupled. On TPU7X (8 devices), 28 is indivisible by 8, triggering sharding verification errors. This PR dynamically calculates embedding dimensions (((28 + device_count - 1) // device_count) * device_count), ensuring clean divisibility across any device topology while removing unused decoupled parameters.Implementation Details
.github/workflows/ci_pipeline.yml: Added thetpu7x-testsjob matrix alongside existing test suites, triggeringtpu7x-unit,tpu7x-integration, andtpu7x-post-training-unitruns. Updated status aggregation (all_tests_passed/notify_failure/investigate_failure) to enforce TPU7X pass requirements before merge..github/workflows/run_tests_coordinator.yml: Configured job dispatch routing for TPU7X matrix flavors, mapping them to self-hosted runnerlinux-x86-tpu7x-224-4tputargeting devicetpu7x-8using containermaxtext-unit-test-tpu:py312.Shortcomings & Future Improvements
run_tests_coordinator.yml,tests/inference/kvcache_test.pyis temporarily ignored fortpu7x-unit. On 8-device meshes, compiling the Multi-Head Latent Attention (MLA) KV cache update kernel (test_update_kv_cache) triggers an XLA compiler loop/hang on the currentlibtpubackend, pushing execution past pod timeouts. Re-enabling this test via a compiler bump or layout adaptation is tracked in our follow-up child bug.BUGS: b/527927834, b/529360553, b/527504273, b/529379676
Tests
Tested extensively on remote TPU VM (
darisoy-gvnic-test) by triggering workflow dispatches against self-hosted runner pools via GitHub Actions CLI:Test Execution Comparison
All required test suites completed with 0 failures. Below is the exact execution breakdown comparing standard TPU (
v6e-4) against TPU7X (tpu7x-8):tpu-unittpu7x-unittpu-unit.tpu-integrationtpu7x-integrationtpu-post-training-unittpu7x-post-training-unitFollow-up Tracking
tests/inference/kvcache_test.pyintpu7x-unit.@pytest.mark.skip_on_tpu7xfrommoe_test.py).Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.