entangling exuberance
talks   experiments   about  
PyTorch on M1/M2 ARM

May 04, 2023 • 2 minutes

Liked? Share


macOS M1 machine come with GPU and ML/AI framework Metal.

Apple’s M1 arm based chips in the latest MacBooks, are designed to be a powerful and efficient processor for running machine learning workloads. The macos-metal and macos-tensorflow frameworks enable running TensorFlow 2 on M1 machines, which provides even better performance than running it on traditional x86 processors because it’s SoC rather than having different components plugging in together - read more here

Getting it right is little bit tricky, but here are simple things you can do get it write.

NOTE: Please note that Code snippets wrap in small screen, and also take care that code snippets are for reference only, and may not work as is in the future.

To get started with PyTorch, PyTorch website has a very good configuration tool at https://pytorch.org/

PyTorch Configuration

This gives us a command line to install pytorch, we will start with Anaconda installation, since it is easier to manage packages and environments.

Above command should cause pytorch not to complain about symbol not found or library not found errors.

And with the above steps, you are ready to go run pytorch on M1/M2 ARM Macs. Also, please note these commands might change later once PyTorch completes the full port to M1/M2 ARM machines.

Liked? Share