You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,7 +44,7 @@ dive into the lazy tensor system, see our
44
44
***High Performance on TPUs**: PyTorch/XLA is optimized to deliver exceptional performance for training and inference on Google Cloud TPUs, which are custom-designed AI accelerators.
45
45
***Scalability**: Seamlessly scale your models from a single device to large TPU Pods with minimal code changes, enabling you to tackle more ambitious projects.
46
46
***Familiar PyTorch Experience**: Continue using the PyTorch APIs and ecosystem you know and love. PyTorch/XLA aims to make the transition to XLA devices as smooth as possible, often requiring only minor modifications to existing PyTorch code.
47
-
***Cost-Efficiency**: TPUs offer a compelling price/performance ratio for many AI workloads. PyTorch/XLA helps you harness this efficiency.
47
+
***Cost-Efficiency**: TPUs offer a compelling price/performance ratio for many AI workloads. PyTorch/XLA helps you take advantage of this efficiency.
48
48
***Versatility**: Accelerate a wide range of AI workloads, including chatbots, code generation, media content generation, vision services, and recommendation engines.
49
49
***Support for Leading Frameworks**: While focused on PyTorch, XLA itself is a compiler backend used by other major frameworks like JAX and TensorFlow.
50
50
@@ -55,10 +55,49 @@ While PyTorch/XLA can theoretically run on any XLA-compatible backend, its prima
55
55
***Google Cloud TPUs**: Including various generations like TPU v5 and v6. [Learn more about TPUs](https://cloud.google.com/tpu/docs/intro-to-tpu).
56
56
***GPUs via XLA**: PyTorch/XLA also supports running on NVIDIA GPUs through the OpenXLA PJRT plugin, providing an alternative execution path. [Learn more about GPUs on Google Cloud](https://cloud.google.com/compute/docs/gpus).
57
57
58
+
## TPU Setup
59
+
60
+
Create a TPU with the base image to use nightly wheels or from the stable
61
+
release by specifying the `RUNTIME_VERSION`.
62
+
63
+
```bash
64
+
export ZONE=us-central2-b
65
+
export PROJECT_ID=your-project-id
66
+
export ACCELERATOR_TYPE=v4-8 # v4-16, v4-32, …
67
+
export RUNTIME_VERSION=tpu-vm-v4-pt-2.0 # or tpu-vm-v4-base
68
+
export TPU_NAME=your_tpu_name
69
+
70
+
gcloud compute tpus tpu-vm create ${TPU_NAME} \
71
+
--zone=${ZONE} \
72
+
--accelerator-type=${ACCELERATOR_TYPE} \
73
+
--version=${RUNTIME_VERSION} \
74
+
--subnetwork=tpusubnet
75
+
```
76
+
77
+
If you have a single host VM (e.g. v4-8), you can ssh to your vm and run
78
+
the following commands from the vm directly. Otherwise, in case of TPU
79
+
pods, you can use `--worker=all --command=""` similar to
-[Quickstart Guide](./xla-quickstart.md): Get started with PyTorch/XLA on Google Cloud TPUs.
61
101
-[Examples](./xla-examples.md): Explore example code for training and inference on TPUs.
62
102
-[Profiling and Performance](./xla-profiling.md): Learn how to profile and optimize your PyTorch/XLA applications.
63
103
-[Advanced Topics](./xla-advanced.md): Dive deeper into advanced concepts like graph optimization, data loading, and distributed training with PyTorch/XLA.
0 commit comments