Last active
November 8, 2022 18:15
-
-
Save muellerzr/a85c9692101d47a9264a27fb5478225a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch_xla.core.xla_model as xm | |
import torch_xla.core.xla_env_vars as xenv | |
import os | |
def main(args=None): | |
print("I did something!") | |
if os.getenv(xenv.HOST_WORLD_SIZE, None) and xm.xrt_world_size() > 1: | |
xm.rendezvous("checking_out") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment