Running Calculations on GPU with Mac Mini M1

I am a newbie and was wondering if my 2020 Mac M1 Mini with the Apple silicon CPU and GPU would actually be able to use the GPU.

Indeed tensorflow has support for “non NVIDIA-GPU” devices !

Note: This page is for non-NVIDIA® GPU devices. For NVIDIA® GPU support, go to the Install TensorFlow with pip guide. (see link 3.)

I thought this wouldn’t be supported because normally only NVIDIA Graphics Cards are supported?

  1. I followed this really simple medium tutorial

Also useful to run this command system_profiler -detailLevel mini and get some specs in case there is some incompatibility:

My system specs
Software:

      System Version: macOS 13.4 (22F66)
      Kernel Version: Darwin 22.5.0

Memory:

      Memory: 8 GB
      Type: LPDDR4
      Manufacturer: Micron


Graphics/Displays:

    Apple M1:

      Chipset Model: Apple M1
      Type: GPU
      Bus: Built-In
      Total Number of Cores: 8
      Vendor: Apple (0x106b)
      Metal Support: Metal 3

Hardware:

      Model Name: Mac mini
      Chip: Apple M1
      Total Number of Cores: 8 (4 performance and 4 efficiency)
      Memory: 8 GB

  1. Also the apple/metal site is interesting Tensorflow Plugin - Metal - Apple Developer,
  2. And the pluggable device from Tensorflow Official Docs

Any tips are greatly welcome :slight_smile:

Have to add that I do not see much performance enhancement, but will report back after longer testing.

@Mah_Neh,

Since you are using M1 chip, it is recommend to use TF Metal plugin to accelerate training on Mac GPUs.

Thank you!

1 Like

However I do not see much improvement in speed. Do you know of any benchmark/comparison of running GPU vs CPU in this case?

@Mah_Neh,

Sorry, I don’t know.

Thank you!