Add tpu v7x-16 for buildkite agent#401
Conversation
1ac72c0 to
ff6080b
Compare
c00f595 to
b396299
Compare
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
b396299 to
5ad9f07
Compare
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
5ad9f07 to
1c5e97c
Compare
There was a problem hiding this comment.
Looks like this is very similar to ci_v7x/main.tf file, do we see a way to update that startup script and reuse them?
Also it would be great that user don't have to remember if the instance they are creating are multi-host so that they don't accidentally set accelerator_type tpu7x-2 to a multi host module. https://screenshot.googleplex.com/C9Tjr6H4FAMcQyQ this seems to suggest anything larger than 8 cores is multi host
There was a problem hiding this comment.
Done. Combine them and also extract it to startup-script.sh.tftpl
| UserKnownHostsFile /dev/null | ||
| EOF | ||
|
|
||
| # Write the ephemeral private key generated by Terraform |
There was a problem hiding this comment.
The comment suggests the ssh key is the ephemeral but I think each time we run the cicd tests on multi hosts they need to communicate with each other. Would the key expire after certain time?
There was a problem hiding this comment.
The key is considered ephemeral because its lifecycle is tied strictly to the Terraform deployment. It is
generated dynamically during apply, exists only within the state and the VM, and is discarded once the
infrastructure is destroyed. This avoids the need for long-term secret management in GCP Secret Manager.
But we can tweak the comments if you think it's better.
There was a problem hiding this comment.
Got it, yeah lets remove the ephemeral part since it's a bit misleading imo.
theminghuang
left a comment
There was a problem hiding this comment.
We also store cache (other than model weights that can be solved with runai_streamer) in the attached disk so I think attach disk is required
is READ_WRITE_SINGLE an option https://screenshot.googleplex.com/BQzwHVFX7LEacet? I think each host get it's own disk if I'm not mistaken and it can claim the sole ownership |
I don't think so. There's a note below: And we have tested it. Multi-host actually does not work with single-writer mode |
Signed-off-by: dennis yeh <dennis.yeh@cienet.com>
ce3b6a6 to
0bea70f
Compare
| UserKnownHostsFile /dev/null | ||
| EOF | ||
|
|
||
| # Write the ephemeral private key generated by Terraform |
There was a problem hiding this comment.
Got it, yeah lets remove the ephemeral part since it's a bit misleading imo.
| echo "Setting up backward compatibility symlink for JAX cache..." | ||
| # Create the persistent directory first | ||
| sudo mkdir -p /mnt/disks/persist/tpu_jax_cache | ||
| sudo chmod 777 /mnt/disks/persist/tpu_jax_cache | ||
|
|
||
| # Forcefully intercept old CI jobs writing to /tmp and redirect them to the persistent disk | ||
| sudo rm -rf /tmp/tpu_jax_cache | ||
| sudo ln -s /mnt/disks/persist/tpu_jax_cache /tmp/tpu_jax_cache | ||
|
|
||
| # ========================================== | ||
| # 2. Automated Disk Garbage Collection (Cron) | ||
| # ========================================== | ||
| echo "Setting up daily cron job for JAX cache cleanup..." | ||
| echo -e '0 2 * * * root find /mnt/disks/persist/tpu_jax_cache -type f -mtime +30 -delete > /dev/null 2>&1\n30 2 * * * root find /mnt/disks/persist/tpu_jax_cache -type d -empty -delete > /dev/null 2>&1' | sudo tee /etc/cron.d/tpu_cache_cleanup | ||
| sudo chmod 0644 /etc/cron.d/tpu_cache_cleanup |
There was a problem hiding this comment.
Should we remove these and other setup related to /mnt/disks/persist as we don't really have a mount disk? And it also make it clear that for tests running on multi host should not use cache (or it will fully occupy the boot disk)
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
6c69cc6 to
3d94c15
Compare
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
1f1cfdb to
e2a186a
Compare
- Use 'ci-bk' infix for multi-host TPU VM names and labels to avoid conflicts with existing v7x TPU resources - Include the hostname in Buildkite agent tags to better identify the agent. Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
Description
This changes add tpu v7x-16 for buildkite by using Terraform
Addition:
FYI:
The multi-host does not support attaching read-write mode disk (ref), and there isn't any way to scale up the vm boot disk size from even using the official
gcloud CLI.Therefore, a better solution for accessing the model weights is using
runai_streamerinstead of downloading the weights to the local disk.Tests
buildkite (run the multihost test with the agent)
Checklist
Before submitting this PR, please make sure: