How To Install TensorFlow on M1 Mac
tensorflowapple-siliconm1setupminiforge
Abstraction: Step-by-step TensorFlow setup on Apple M1 ARM64 chip
Key points:
- Apple released the ARM64 M1 chip in November 2020; as of writing, Apple had released TensorFlow 2.5 for Apple Silicon
- Install chain: Xcode CLI tools → Miniforge (arm64) → conda virtual env (Python 3.8) →
tensorflow-deps,tensorflow-macos,tensorflow-metalplugins - The
tensorflow-metalpackage enables GPU acceleration via Apple's Metal API on M1 - Benchmark on MNIST with a 2-layer CNN, batch size 128, 12 epochs completed in ~1 min 57 s on M1
- Miniforge is required (not Anaconda) because it provides natively compiled ARM64 packages
Connections: Tensorflow · Apple · Deep Learning · Hardware Acceleration
Source: https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706