Skip to content

Commit d05e1b2

Browse files
authored
Graduating tpu v6e from community to core (GoogleCloudPlatform#4909)
2 parents f83822b + 0386bea commit d05e1b2

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GKE TPU V6 blueprint
22

3-
This example shows how a TPU cluster with v6 machines and topology 4x4 can be created. The example also includes a `tpu-available-chips.yaml` that creates a kubernetes service and job. The job includes commands to install `jax` and run a simple command using jax, on the TPU.
3+
This example shows how a TPU cluster with v6 machines and topology 4x4 can be created. The example also includes a `tpu-multislice.yaml` that creates a kubernetes service and job. The job includes commands to install `jax` and run a simple command using jax, on the TPU.
44

55
Key parameters when working with TPUs:
66

@@ -59,7 +59,7 @@ This section guides you through the cluster creation process, ensuring that your
5959
* `BUCKET_NAME`: the name of the new Cloud Storage bucket.
6060
* `COMPUTE_REGION`: the compute region where you want to store the state of the Terraform deployment.
6161

62-
1. In the [`community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml`](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml) file, replace the following variables in the `terraform_backend_defaults` and `vars` sections to match the specific values for your deployment:
62+
1. In the [`examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml`](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml) file, replace the following variables in the `terraform_backend_defaults` and `vars` sections to match the specific values for your deployment:
6363

6464
* `bucket`: the name of the Cloud Storage bucket you created in the previous step.
6565
* `project_id`: your Google Cloud project ID.
@@ -72,10 +72,10 @@ This section guides you through the cluster creation process, ensuring that your
7272
* `authorized_cidr`: The IP address range that you want to allow to connect with the cluster. This CIDR block must include the IP address of the machine to call Terraform.
7373
* `reservation`: the name of the compute engine reservation of TPU v6 nodes.
7474

75-
To modify advanced settings, edit `community/examples/gke-tpu-v6/gke-tpu-v6.yaml`.
75+
To modify advanced settings, edit `examples/gke-tpu-v6/gke-tpu-v6.yaml`.
7676

7777
1. To use on-demand capacity, you can remove the reservation usage by making the following changes.
78-
1. Remove the `reservation` variable from the [`gke-tpu-v6-deployment.yaml`](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml) file.
78+
1. Remove the `reservation` variable from the [`gke-tpu-v6-deployment.yaml`](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml) file.
7979
1. Remove the `reservation_affinity` block from the nodepool module.
8080

8181
1. Generate [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/provide-credentials-adc#google-idp) to provide access to Terraform.
@@ -86,8 +86,8 @@ This section guides you through the cluster creation process, ensuring that your
8686
```sh
8787
cd ~/cluster-toolkit
8888
./gcluster deploy -d \
89-
community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml \
90-
community/examples/gke-tpu-v6/gke-tpu-v6.yaml
89+
examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml \
90+
examples/gke-tpu-v6/gke-tpu-v6.yaml
9191
```
9292

9393
## Advanced Blueprint: GKE TPU with GCS Integration
@@ -109,15 +109,15 @@ The process is nearly identical to the basic deployment.
109109
```sh
110110
cd ~/cluster-toolkit
111111
./gcluster deploy -d \
112-
community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml \
113-
community/examples/gke-tpu-v6/gke-tpu-v6-advanced.yaml
112+
examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml \
113+
examples/gke-tpu-v6/gke-tpu-v6-advanced.yaml
114114
```
115115

116116
1. After deployment, the blueprint will output instructions for running a fio benchmark job. This job serves as a validation test to confirm that the GCS mounts are working correctly for both reading and writing. Follow the printed instructions to run the test.
117117

118118
## Run the sample job
119119

120-
The [tpu-available-chips.yaml](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/community/examples/gke-tpu-v6/tpu-available-chips.yaml) file creates a service and a job resource in kubernetes. It is based on https://cloud.google.com/kubernetes-engine/docs/how-to/tpus#tpu-chips-node-pool. The workload returns the number of TPU chips across all of the nodes in a multi-host TPU slice.
120+
The [tpu-multislice.yaml](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/examples/gke-tpu-v6/tpu-multislice.yaml) file creates a service and a job resource in kubernetes. It is based on https://cloud.google.com/kubernetes-engine/docs/how-to/tpus#tpu-chips-node-pool. The workload returns the number of TPU chips across all of the nodes in a multi-host TPU slice.
121121

122122
1. Connect to your cluster:
123123

@@ -127,7 +127,7 @@ The [tpu-available-chips.yaml](https://github.com/GoogleCloudPlatform/cluster-to
127127

128128
Replace the `REGION` and `PROJECT_ID` with the ones used in the blueprint.
129129

130-
1. Update the nodeSelector under the template spec of tpu-available-chips.yaml file. The values depend on the tpu accelerator and tpu topology used in the blueprint.
130+
1. Update the nodeSelector under the template spec of tpu-multislice.yaml file. The values depend on the tpu accelerator and tpu topology used in the blueprint.
131131

132132
```yaml
133133
nodeSelector:
@@ -138,7 +138,7 @@ The [tpu-available-chips.yaml](https://github.com/GoogleCloudPlatform/cluster-to
138138
1. Create the resources:
139139

140140
```sh
141-
kubectl create -f ~/cluster-toolkit/community/examples/gke-tpu-v6/tpu-multislice.yaml
141+
kubectl create -f ~/cluster-toolkit/examples/gke-tpu-v6/tpu-multislice.yaml
142142
```
143143

144144
This command returns a service and a job name.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tools/validate_configs/validate_configs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ check_background() {
120120
fi
121121
}
122122

123-
CONFIGS=$(find examples/ community/examples/ tools/validate_configs/test_configs/ docs/tutorials/ docs/videos/build-your-own-blueprint/ -name "*.yaml" -type f -not -path 'examples/machine-learning/a3-megagpu-8g/*' -not -path 'examples/machine-learning/a3-ultragpu-8g/*' -not -path 'examples/machine-learning/build-service-images/*' -not -path 'examples/gke-a3-ultragpu/*' -not -path 'examples/hypercompute_clusters/*' -not -path 'examples/gke-consumption-options/*' -not -path 'examples/gke-a4/*' -not -path 'examples/gke-a3-megagpu/*' -not -path 'examples/machine-learning/a4-highgpu-8g/*' -not -path 'examples/machine-learning/a4x-highgpu-4g/*' -not -path 'community/examples/gke-tpu-v6/*' -not -path 'community/examples/xpk-n2-filestore/*' -not -path 'examples/gke-a4x/*' -not -path 'examples/science/af3-slurm/*' -not -path 'examples/gke-h4d/*' -not -path 'community/examples/hpc-slinky/*' -not -path 'examples/gke-g4/*' -not -path 'community/examples/slurm-gke/*' -not -path 'examples/hpc-slurm-h4d/*' -not -path 'examples/machine-learning/a3-highgpu-8g/*' -not -path 'examples/netapp-volumes.yaml' -not -path 'examples/gke-tpu-7x/*')
123+
CONFIGS=$(find examples/ community/examples/ tools/validate_configs/test_configs/ docs/tutorials/ docs/videos/build-your-own-blueprint/ -name "*.yaml" -type f -not -path 'examples/machine-learning/a3-megagpu-8g/*' -not -path 'examples/machine-learning/a3-ultragpu-8g/*' -not -path 'examples/machine-learning/build-service-images/*' -not -path 'examples/gke-a3-ultragpu/*' -not -path 'examples/hypercompute_clusters/*' -not -path 'examples/gke-consumption-options/*' -not -path 'examples/gke-a4/*' -not -path 'examples/gke-a3-megagpu/*' -not -path 'examples/machine-learning/a4-highgpu-8g/*' -not -path 'examples/machine-learning/a4x-highgpu-4g/*' -not -path 'community/examples/gke-tpu-v6/*' -not -path 'community/examples/xpk-n2-filestore/*' -not -path 'examples/gke-a4x/*' -not -path 'examples/science/af3-slurm/*' -not -path 'examples/gke-h4d/*' -not -path 'community/examples/hpc-slinky/*' -not -path 'examples/gke-g4/*' -not -path 'community/examples/slurm-gke/*' -not -path 'examples/hpc-slurm-h4d/*' -not -path 'examples/machine-learning/a3-highgpu-8g/*' -not -path 'examples/netapp-volumes.yaml' -not -path 'examples/gke-tpu-7x/*' -not -path 'examples/gke-tpu-v6/*')
124124
# Exclude blueprints that use v5 modules.
125125
declare -A EXCLUDE_EXAMPLE
126126
EXCLUDE_EXAMPLE["tools/validate_configs/test_configs/two-clusters-sql.yaml"]=

0 commit comments

Comments
 (0)