-
Notifications
You must be signed in to change notification settings - Fork 566
Catch info from metadata #4724
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
Catch info from metadata #4724
Conversation
torch_xla/experimental/tpu.py
Outdated
|
||
accelerator_type = tpu_env[xenv.ACCELERATOR_TYPE] | ||
if version() == 4: | ||
if tpu_env['ACCELERATOR_TYPE'].startswith('v4') or tpu_env['ACCELERATOR_TYPE'].startswith('v5'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@will-cromar what's the right place to add a test for this one? I felt like we had similar tests somwehre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The relevant unit test is here:
xla/test/pjrt/test_experimental_tpu.py
Line 90 in 18674da
def test_tpu_env_from_gce_metadata(self, tpu_env_yaml, expected_env, |
Can we just do tpu.version() >= 4
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one question regarding #ACCELERATOR_TYPE match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This reverts commit 4d67a04.
Update code to catch info from metadata