Apple has released its own fork of the TensorFlow 2.4 machine learning framework, specifically optimised for its newly released M1 processor.
According to Apple, the M1-compiled version of TensorFlow delivers several times faster performance on a number of benchmarks, compared to the same jobs running on an Intel version of the same 2020 edition MacBook Pro.
The fork, available as open source, requires MacOS 11.0 or better, and provides accelerations on Macs running the new M1 processor.
Existing TensorFlow scripts run as-is with the fork; they do not need to be reworked to take advantage of its performance gains. According to VentureBeat, Apple plans to contribute its changes to the main TensorFlow project, to serve as a basis for other optimisations.
Apple’s revamp of TensorFlow is one of the first examples of how M1 Macs are intended to draw developers to the Mac platform. M1 chips in new Macs replace the use of the Intel x86 processor, but can run existing software compiled for the x86 by way of Apple’s Rosetta2 binary translation technology.
However, Rosetta2-translated apps do incur a performance hit, with some benchmarks running as slowly as 59 per cent of native speed. For performance-sensitive applications, it makes sense to compile them to run natively on the M1.