M1 MBP not accelerating gpu for TensorFlow

My m1 MBP is not using the full gpu power when running TensorFlow. Its taking about 6 seconds / epoch when for the same task other get 1 second per epoch. when running the training the Mac doesn't get hot and the fans don't rev. Any advice? Thanks, Logan

You can switch between CPU and GPU, both work fine with TF 2.5 and MBP M1. Depending on your batch size, the CPU can be much faster.

from tensorflow.python.framework.ops import disable_eager_execution

disable_eager_execution()

with tf.device('/CPU:0'): # GPU or CPU
   ...


TF 2.5 installation steps:

https://developer.apple.com/metal/tensorflow-plugin/

M1 MBP not accelerating gpu for TensorFlow
 
 
Q