Live data from Hacker News

Apple M1 support for TensorFlow 2.5 pluggable device API

developer.apple.com

1–10 of 124 posts

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#3
This is pretty cool to have more generic GPU-based support.

Might also be related: Tensorflow Lite Core ML delegate enables running TFLite model on CoreML enabled iOS devices.

https://www.tensorflow.org/lite/performance/coreml_delegate

Would nice to see performance comparisons on M1 Mac/iPad for which way is more performance and efficient. (Admittedly TF vs TF-lite is a 100% apple to apple comparison, pun-intended).

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#5
M1 and AMD GPU support. I'm personally more interested in the latter as I haven't yet upgraded my MacBook Pro and I expect that my Vega 20 to be faster than M1 at ML training.

The raw compute power of M1's GPU seems to be 2.6 TFLOPS (single precision) vs 3.2 TFLOPS for Vega 20. This can give you an estimate of how fast it would be for training.

Just for reference Nvidia's flagship desktop GPU(3090)'s FP32 performance is 35.5 TFLOPS.

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#6
post #4
post #2

Very cool. I’m not an ML guy, so apologies if this is a dumb question: how good is performance compared to other hardware here?

Not a lot of benchmarks, but I heard large models struggle on M1.

Have a reference perhaps? I imagine it would be severely limited by memory size & speed for large datasets, but there might be other factors as well.

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#7
I have found the M1 air fine for web browsing but kind of hard to install software on.

Following the instructions: -----

  python -m pip install tensorflow-macos 

  ...

  ERROR: Failed building wheel for numpy

  Failed to build numpy

  ERROR: Could not build wheels for numpy which use PEP 517 and 

  cannot be installed directly
-----

(base) dave@daves-air ~ % uname -a

  Darwin daves-air.lan 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#8
post #7

I have found the M1 air fine for web browsing but kind of hard to install software on. Following the instructions: ----- python -m pip install tensorflow-macos ... ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly ----- (base) dave@daves-air ~ % uname -a Darwin daves-air.lan 20.5.0 Darwin Kernel Version 20.5.0: Sat M…

I run everything python under Rosetta. Easiest way is to install home brew for Intel processors then make an alias to that version for managing rosetta stuff

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#9
I was able to install this fairly easily (much more so then the crap they dumped out here - https://github.com/apple/tensorflow_macos. Just take a look at the 200 github issues that were ignored for the most part...)

I also noticed that in my project I got a decent speedup immediately when executing my model, but I have not run any benchmarks.

But, where do you go to file bugs? Ask questions? etc. I am not a big Mac developer, so is there something I don't know?

Re: Apple M1 support for TensorFlow 2.5 pluggable device API

#10
post #7

I have found the M1 air fine for web browsing but kind of hard to install software on. Following the instructions: ----- python -m pip install tensorflow-macos ... ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly ----- (base) dave@daves-air ~ % uname -a Darwin daves-air.lan 20.5.0 Darwin Kernel Version 20.5.0: Sat M…

I skipped the tensorflow-deps and the tensorflow-macos dependencies since it was trying to downgrade a bunch of stuff:

$ pip install -U tensorflow-macos --no-deps

That seemed to work for me at least.

Post reply on HN