Skip to content

Add GKE TPU v5e example#5840

Open
agrawalkhushi18 wants to merge 7 commits into
GoogleCloudPlatform:developfrom
agrawalkhushi18:tpu-v5e
Open

Add GKE TPU v5e example#5840
agrawalkhushi18 wants to merge 7 commits into
GoogleCloudPlatform:developfrom
agrawalkhushi18:tpu-v5e

Conversation

@agrawalkhushi18

@agrawalkhushi18 agrawalkhushi18 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This PR adds a new GKE blueprint and workload templates optimized specifically for provisioning and running jobs on Cloud TPU v5e clusters.

Key Changes

  • New TPU v5e Blueprint (examples/gke-tpu-v5e/):
    • gke-tpu-v5e.yaml: Adds a blueprint that sets up a GKE cluster with a single VPC network and pre-configures Kueue, JobSet, and Cert-Manager.
    • gke-tpu-v5e-deployment.yaml: Adds the deployment settings file, pre-configured with recommended TPU v5e variables and GCS backend configurations.
    • kueue-job-sample.yaml: An example Kueue-enabled JobSet workload that demonstrates how to submit jobs to the Kueue queue and request/limit TPU resources (google.com/tpu) properly on the v5e cluster.
    • kueue-configuration.yaml.tftpl: Added a Kueue configuration template that defines resource flavors, cluster queues, and local queues dynamically mapped to the TPU v5e accelerator type (tpu-v5-lite-podslice) and total chip quota.
  • Workload Templates:
    • tpu-singleslice.yaml: A standard, lightweight Kubernetes Job configured for single-slice (2x2) JAX workloads.
    • kueue-job-sample.yaml: A sample workload pre-configured for Kueue job queue integration.
  • Documentation:
    • README.md: A guide covering deployment steps and teardown.

Verification

  • Workload Test: Deployed on a live GKE cluster and ran tpu-singleslice.yaml to verify successful TPU hardware initialization and JAX device detection (Global device count: 4).

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@agrawalkhushi18 agrawalkhushi18 self-assigned this Jun 24, 2026
@agrawalkhushi18 agrawalkhushi18 added the release-key-new-features Added to release notes under the "Key New Features" heading. label Jun 24, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new blueprint example for deploying GKE TPU v5e clusters using the Cluster Toolkit. It provides comprehensive configuration files, including infrastructure deployment manifests, Kueue integration for job scheduling, and sample workloads to verify TPU connectivity. Additionally, the PR updates the Google provider version constraints to ensure compatibility across the repository.

Highlights

  • New GKE TPU v5e Blueprint: Added a new blueprint example for deploying GKE TPU v5e clusters, providing a complete infrastructure setup for high-performance machine learning workloads.
  • Advanced Scheduling with Kueue: Integrated Kueue for efficient job queuing and quota management, including a configuration template and sample JobSet manifest.
  • Workload Validation: Included a sample Kubernetes job to verify TPU connectivity and JAX functionality on the provisioned infrastructure.
  • Provider Version Update: Updated the Google provider version constraint from 7.36.0 to 7.34.0 across the configuration and validation test suites.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new GKE TPU v5e blueprint example, including deployment configurations, a Kueue setup, and sample workloads, alongside a minor downgrade of the maximum Google provider version constraint in pkg/config/expand.go and its golden copies. Feedback on the changes includes registering the new example in the main examples/README.md index, providing a default value for tpu_topology to match the default machine type, and declaring the spot variable in the blueprint to prevent validation errors when configuring spot instances.

Comment thread examples/gke-tpu-v5e/README.md
Comment thread examples/gke-tpu-v5e/gke-tpu-v5e.yaml
Comment thread examples/gke-tpu-v5e/gke-tpu-v5e.yaml
Comment thread examples/gke-tpu-v5e/README.md Outdated
@Neelabh94 Neelabh94 removed their assignment Jul 2, 2026
@agrawalkhushi18 agrawalkhushi18 marked this pull request as draft July 6, 2026 18:44
@agrawalkhushi18 agrawalkhushi18 marked this pull request as ready for review July 8, 2026 07:10

1. Clone the Cluster Toolkit from the git repository:

```sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we update this to binary installation and not git clone.


## Running Pathways Workloads

This blueprint supports **Pathways-on-Cloud** orchestration, allowing you to run JAX workloads distributed across remote TPU workers coordinated by a CPU-based head node. The sections below guide you through deploying and verifying a sample job that prints the active TPU device count over the coordinated Pathways network.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we also hyperlink to the pathways GitHub repo?

* `region`: the compute region for the cluster.
* `zone`: the compute zone for the TPUs.
* `num_slices`: the number of TPU slices to create.
* `machine_type`: the machine type of the TPU (e.g., `ct5lp-hightpu-8t`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we update the example in ct51p-hightpu-8t to the machine types relevant to tpu v5e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants