How to Use Your Macbook GPU for Tensorflow?

Let’s unleash the power of the internal GPU of your Macbook for deep learning in Tensorflow/Keras!

Jack Chih-Hsu Lin
Geek Culture

--

Credit: Maxence Pira from Unsplash

Why this article?

Many Macbook laptops come with AMD GPUs. Unfortunately, AMD GPUs have been notoriously nearly incompatible with most major deep learning frameworks because Nvidia and CUDA have been developed a gigantic deep learning ecosystem. Luckily, Apple recently has released Tensorflow Metal to enable AMD GPU for Tensorflow. Without a desktop with pricy GPU or an external GPU, we can still leverage the GPU from Macbook to accelerate deep learning in Tensorflow/Keras. Are you ready to unleash the power of your GPU in your Macbook? Let’s go!

Device specification

My Macbook Pro version is 2019. It has a CPU of 2.4 GHz 8-Core Intel Core i9, one GPU of AMD Radeon Pro 5500M (RAM 8 GB) and one GPU of Intel UHD Graphics 630 (RAM 1536 MB).

Prerequisites

  1. A Macbook with AMD GPU
  2. Anaconda for managing environment
  3. Pip for installing packages
  4. Good internet/WiFi connection for downloading packages

Step 1: Back up Your Data and Upgrade macOS…

--

--

Jack Chih-Hsu Lin
Geek Culture

Lead Data Scientist (GenAI), C3.ai. ❤️ ML/DL/GenAI. I use GenAI to create value with ❤️. Let's connect https://www.linkedin.com/in/jacklindsai/