Skip to content

Add tpu v7x-16 for buildkite agent#401

Open
meiyeh123 wants to merge 9 commits into
vllm-project:mainfrom
meiyeh123:dennis/add-v7x-16
Open

Add tpu v7x-16 for buildkite agent#401
meiyeh123 wants to merge 9 commits into
vllm-project:mainfrom
meiyeh123:dennis/add-v7x-16

Conversation

@meiyeh123

@meiyeh123 meiyeh123 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

This changes add tpu v7x-16 for buildkite by using Terraform

Addition:

  • 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.

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_streamer instead 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:

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have made or will make corresponding changes to any relevant documentation.

@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from 1ac72c0 to ff6080b Compare July 3, 2026 07:13
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch 2 times, most recently from c00f595 to b396299 Compare July 8, 2026 09:46
@meiyeh123
meiyeh123 marked this pull request as draft July 8, 2026 09:46
meiyeh123 added 3 commits July 9, 2026 10:55
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>
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from b396299 to 5ad9f07 Compare July 9, 2026 07:52
@meiyeh123
meiyeh123 requested a review from CienetStingLin July 9, 2026 07:53
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from 5ad9f07 to 1c5e97c Compare July 9, 2026 07:54
@meiyeh123
meiyeh123 marked this pull request as ready for review July 9, 2026 07:55

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Combine them and also extract it to startup-script.sh.tftpl

UserKnownHostsFile /dev/null
EOF

# Write the ephemeral private key generated by Terraform

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Got it, yeah lets remove the ephemeral part since it's a bit misleading imo.

@theminghuang theminghuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@theminghuang

Copy link
Copy Markdown
Collaborator

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

@meiyeh123

Copy link
Copy Markdown
Contributor Author

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:
https://screenshot.googleplex.com/8CBqCCHV66smRHf

And we have tested it. Multi-host actually does not work with single-writer mode

Signed-off-by: dennis yeh <dennis.yeh@cienet.com>
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from ce3b6a6 to 0bea70f Compare July 10, 2026 04:41
UserKnownHostsFile /dev/null
EOF

# Write the ephemeral private key generated by Terraform

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Got it, yeah lets remove the ephemeral part since it's a bit misleading imo.

Comment on lines +185 to +199
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from 6c69cc6 to 3d94c15 Compare July 10, 2026 09:22
@meiyeh123
meiyeh123 marked this pull request as draft July 10, 2026 09:22
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
Signed-off-by: Dennis Yeh <dennis.yeh@cienet.com>
@meiyeh123
meiyeh123 force-pushed the dennis/add-v7x-16 branch from 1f1cfdb to e2a186a Compare July 13, 2026 07:29
@meiyeh123
meiyeh123 requested a review from theminghuang July 13, 2026 07:30
@meiyeh123
meiyeh123 marked this pull request as ready for review July 13, 2026 07:31
 - 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants