Optimize TensorFlow performance using the Profiler on M1 Mac

Viewed 12

I'm trying to optimize my models' performance using tensorboard profiling. I'm using M1 Max MBP, and the profiler shows that I'm using the CPU (see the picture below). However, when I run

device_name = tf.test.gpu_device_name()
if not device_name:
  raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))

it returns Found GPU at: /device:GPU:0Metal device set to: Apple M1 Max.

Furthermore, the profiler shows that I'm only using the host:

TF Op Placementinfo
generally desired to have more ops on device
Host: 100.0%
Device: 0.0%

Is TensorFlow not using the GPU during the training even if it can detect it? How can I fix this issue and use the GPU? enter image description here

0 Answers
Related