You can also learn more about Metal and MPS on Apple’s Metal page. ![]() To get started, just install the latest Preview (Nightly) build on your Apple silicon Mac running macOS 12.3 or later with a native version (arm64) of Python. In the graphs below, you can see the performance speedup from accelerated GPU training and evaluation compared to the CPU baseline:Īccelerated GPU training and evaluation speedups over CPU-only (times faster) The Unified Memory architecture also reduces data retrieval latency, improving end-to-end performance. This reduces costs associated with cloud-based development or the need for additional local GPUs. This makes Mac a great platform for machine learning, enabling users to train larger networks or batch sizes locally. Training Benefits on Apple SiliconĮvery Apple silicon Mac has a unified memory architecture, providing the GPU with direct access to the full memory store. The new device maps machine learning computational graphs and primitives on the MPS Graph framework and tuned kernels provided by MPS. MPS optimizes compute performance with kernels that are fine-tuned for the unique characteristics of each Metal GPU family. ![]() The MPS backend extends the PyTorch framework, providing scripts and capabilities to set up and run operations on Mac. This unlocks the ability to perform machine learning workflows like prototyping and fine-tuning locally, right on Mac.Īccelerated GPU training is enabled using Apple’s Metal Performance Shaders (MPS) as a backend for PyTorch. Until now, PyTorch training on Mac only leveraged the CPU, but with the upcoming PyTorch v1.12 release, developers and researchers can take advantage of Apple silicon GPUs for significantly faster model training. In collaboration with the Metal engineering team at Apple, we are excited to announce support for GPU-accelerated PyTorch training on Mac.
0 Comments
Leave a Reply. |