Last active
November 8, 2022 02:04
-
-
Save muellerzr/9a813285ee04e5007237dc6fe76053e3 to your computer and use it in GitHub Desktop.
Second version
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.distributed.xla_multiprocessing as xmp | |
import torch_xla.core.xla_model as xm | |
def _mp_fn(index): | |
print("I did something!") | |
xm.rendezvous('checking_out') | |
if __name__ == "__main__": | |
xmp.spawn(_mp_fn, args=(), nprocs=8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment