Post

Replies

Boosts

Views

Activity

Reply to Performance issue on Macbook Pro M1
I saw the same issue, over 7000 seconds per epoch and a lot of warning messages. Then I tried with tf.device("/gpu:0"). Each epoch takes about 38 seconds. However, then I tried with tf.device("/cpu:0"). Each epoch takes only about 7 seconds. So GPU performance is still awful. I have not yet found a neural net architecture where the M1 GPU is faster than the CPU. For matrix multiplication, the GPU can be 9x faster, but this does not carry over to network training. Based on other threads and on the comment above by an Apple engineer, it looks like the Apple team doesn't even realize how bad their TensorFlow speed is. MacBook Air M1 (Mac OS 12 beta) TensorFlow version (2.5 version) with Metal Support Python version: 3.8 GPU model and memory: MacBook Air M1 and 16 GB
Topic: Machine Learning & AI SubTopic: General Tags:
Sep ’21
Reply to Performance issue on Macbook Pro M1
I saw the same issue, over 7000 seconds per epoch and a lot of warning messages. Then I tried with tf.device("/gpu:0"). Each epoch takes about 38 seconds. However, then I tried with tf.device("/cpu:0"). Each epoch takes only about 7 seconds. So GPU performance is still awful. I have not yet found a neural net architecture where the M1 GPU is faster than the CPU. For matrix multiplication, the GPU can be 9x faster, but this does not carry over to network training. Based on other threads and on the comment above by an Apple engineer, it looks like the Apple team doesn't even realize how bad their TensorFlow speed is. MacBook Air M1 (Mac OS 12 beta) TensorFlow version (2.5 version) with Metal Support Python version: 3.8 GPU model and memory: MacBook Air M1 and 16 GB
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Tensorflow_macos performance between python 3.9 and 3.8
I don't think that the issue is Python 3.8 versus 3.9. With 3.8, I see the same slowness using tensorflow-metal. Using the CPU instead of the GPU, each epoch takes 4 seconds rather than 8. It is pretty sad that the GPU is slower. See also my comment at https://developer.apple.com/forums/thread/686098
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Cannot import Tensorflow Apple M1
Just confirming that python 3.9 and tensorflow-macos==2.9.2 and tensorflow-metal==0.5.1 work for me. Later versions of python and of tensorflow do not. Apple should really make Macs work better with TensorFlow, and update the documentation.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’23