Unverified Commit ebde57ac authored by Sam Shleifer's avatar Sam Shleifer Committed by GitHub
Browse files

examples/docs: caveat that PL examples don't work on TPU (#8309)

parent 76e7a44d
...@@ -63,6 +63,7 @@ very detailed [pytorch/xla README](https://github.com/pytorch/xla/blob/master/RE ...@@ -63,6 +63,7 @@ very detailed [pytorch/xla README](https://github.com/pytorch/xla/blob/master/RE
In this repo, we provide a very simple launcher script named [xla_spawn.py](https://github.com/huggingface/transformers/tree/master/examples/xla_spawn.py) that lets you run our example scripts on multiple TPU cores without any boilerplate. In this repo, we provide a very simple launcher script named [xla_spawn.py](https://github.com/huggingface/transformers/tree/master/examples/xla_spawn.py) that lets you run our example scripts on multiple TPU cores without any boilerplate.
Just pass a `--num_cores` flag to this script, then your regular training script with its arguments (this is similar to the `torch.distributed.launch` helper for torch.distributed). Just pass a `--num_cores` flag to this script, then your regular training script with its arguments (this is similar to the `torch.distributed.launch` helper for torch.distributed).
Note that this approach does not work for examples that use `pytorch-lightning`.
For example for `run_glue`: For example for `run_glue`:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment