Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core][TPU] Support TPU V5 #3814

Merged
merged 7 commits into from
Aug 19, 2024
Merged

[Core][TPU] Support TPU V5 #3814

merged 7 commits into from
Aug 19, 2024

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Aug 7, 2024

Closes #2661.

TODO:

  • Do e2e test to make sure it works well
  • Double check the price

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

@cblmemo cblmemo marked this pull request as draft August 7, 2024 14:29
Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @cblmemo! Let's get it in soon, as there are some users asking for this.

sky/resources.py Outdated Show resolved Hide resolved
@@ -546,7 +671,7 @@ def get_catalog_df(region_prefix: str) -> 'pd.DataFrame':
region_prefix)] if not gpu_df.empty else gpu_df

gcp_tpu_skus = get_skus(TPU_SERVICE_ID)
tpu_df = get_tpu_df(gcp_tpu_skus)
tpu_df = get_tpu_df(gcp_skus, gcp_tpu_skus)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need a gcp_skus here? Can we add a comment for that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TPU V5 is not in the tpu skus but in the gcp skus. Added a comment here. Thanks!

sky/clouds/service_catalog/data_fetchers/fetch_gcp.py Outdated Show resolved Hide resolved
@cblmemo cblmemo marked this pull request as ready for review August 17, 2024 16:12
@cblmemo
Copy link
Collaborator Author

cblmemo commented Aug 17, 2024

A note to myself: check price info is correct before merge this.

@cblmemo
Copy link
Collaborator Author

cblmemo commented Aug 18, 2024

@Michaelvll I've checked the documentation again and ensured the pricing calculation is aligned with the doc. The price estimation is still not available on the GCP console - it would be great if we could contact the user for them to double check as I suspect the price will only be shown for those who have TPU v5 quota, but the current impl should be ready to go as well.

image

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for adding the support of v5! LGTM except for several comments below.

sky/clouds/service_catalog/data_fetchers/fetch_gcp.py Outdated Show resolved Hide resolved
sky/clouds/service_catalog/data_fetchers/fetch_gcp.py Outdated Show resolved Hide resolved
Comment on lines 594 to 596
# TODO(tian): Seems like there is no 'Pod' kw in the v5 description.
# Does that means v5 only have TPU Node (instead of VM)? Another
# possibility is that the price shown for v5 TPU is for one core.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we confirm this TODO before merge?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is due to its pricing unit - per chip hour instead of the whole pod. TPU Node is deprecated by GCP now. Reference: https://cloud.google.com/tpu/docs/system-architecture-tpu-vm#tpu_architectures

Just updated the comment. Thanks for catching this!

@cblmemo cblmemo added this pull request to the merge queue Aug 19, 2024
Merged via the queue into master with commit fffeacd Aug 19, 2024
20 checks passed
@cblmemo cblmemo deleted the tpu-v5 branch August 19, 2024 13:31
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.

[TPU] Support TPU v5
2 participants