Machine Learning Leaps with Apple’s M1 CPU Chip

Chibili Mugala
Analytics Vidhya
Published in
6 min readNov 27, 2020

The battle for micro processing supremacy has taken an advanced turn with the ARM-armed M1 chip. Is this enough to overturn the market share of the big player, Intel? How good is the new neural engine in processing consumer and business ML tasks?

M1 Chip: Apple

Apple’s Silicon chip means macOS, iOS and padOS applications can all work seamlessly across platforms. While porting particular applications will come with particular limitations, the ecosystem under Silicon chips will grow exponentially.

A little preamble: the driving force behind this solo move was the cost of Intel chips in MacBooks which had 35% roughly $100 of pre-assembly hardware expenses. Therefore, a reduction in overall hardware cost is ultimately what is expected with the arrival of Silicon chips.

These chips represent the starting line for Apple’s ARM-based system on a chip design, a mobile-based CPU architecture. Integrating multiple chips into one unit, effectively reduces latencies incurred during system communication. Bus bandwidth and speed limitations in older CPU architectures relied on very well-clocked and dedicated communication channels. The M1 has removed these pitfalls. In terms of heat management, having a single chips which is a “Jack of all trades” means reduced footprint for cooling setups such heatsinks and fans. The latest 2020 MacBook Air for instance runs a fan-less design yet amassing great CPU and GPU horsepower.

“Apple states that it has the world’s fastest central processing unit (CPU) core “in low power silicon” and the world’s best CPU performance per watt.”

M1 Performance: Apple

When it announced the new M1 processor during a special “One more thing” event from Apple Park, Apple touted that it’s the “first chip designed specifically for the Mac.” It’s built using a 5-nanometer with 16 billion transistors, and Apple says it was designed “for Mac systems in which small size and power efficiency are critically important.”

As such, the M1 features industry-leading performance per watt. This is why the first Apple Silicon MacBook Air and MacBook Pro models are able to offer such notable improvements in battery life compared to their Intel predecessors.

According to the official TensorFlow Blog, the M1 chip can exploit accelerated training in a Mac-optimised version of TensorFlow together with the new ML compute framework. The addition of better ML processing engine the current generation of padOS with

TensoFlow Logo: https://www.tensorflow.org/

With TensorFlow 2, best-in-class training performance on a variety of different platforms, devices and hardware enables developers, engineers, and researchers to work on their preferred platform. TensorFlow users on Intel Macs or Macs powered by Apple’s new M1 chip can now take advantage of accelerated training using Apple’s Mac-optimised version of TensorFlow 2.4 and the new ML Compute framework. These improvements, combined with the ability of Apple developers being able to execute TensorFlow on iOS through TensorFlow Lite, continue to showcase TensorFlow’s breadth and depth in supporting high-performance ML execution on Apple hardware.

Below are performance experiments based on two Intel and an M1 chip. Clearly the M1 takes the win in all iteration of tests done. Therefore, the validity of Apple’s claim to have developed the most CPU performance per watt output stands true.

TensorFlow Performance: tensorflow.org

GPU Performance on the M1

Not meant for gaming but for that extra processing during deep learning, especially for huge and fast streams of data. This part will explore two aspects of the GPU performance: gaming abilities and machine learning.

It’s laughable to think a mac user has a serious gamer because most developers shunned away from porting games for macOS plus the hardware was not really as diverse/powerful as Windows equivalent. This has left a very small macOS ecosystem of console-level titles, therefore getting a mac is for anything but gaming. For the most part, it’s comparable with taking the Prius to a hellcat drag race.

Apple’s dedicated GPU in the M1 has the capability to run titles like StarCraft 2 using the Rosetta II emulation. However, this comes with caveats as frame rates over 60fps struggle on this ARM CPU. Running the next-gen title like Call of Duty Cold War or Gears of War 5 that run better with 120fps lag due to optimisation shortcomings. Mac is really not ready to take over the gaming scene.

Needless to say that AMD’s Big Navi, RX 6000, Navi 2x, RDNA 2 are light years ahead of what Apple has to offer. AMD’s next-generation GPUs are promising big performance and efficiency gains, along with feature parity with Nvidia in terms of ray tracing support. Granted one of these dedicated GPU easily costs the price of a new Mac, thus this comparison is dully and unfair.

The M1 chip brings Apple’s industry-leading Neural Engine to the Mac for the first time. The M1 Neural Engine features a 16-core design that can perform 11 trillion operations per second. Apple has used the Neural Engine in the iPhone and iPad since the A11 processor was introduced in 2017.

What kind of improvements can you expect with the Neural Engine? Think of the Neural Engine as something designed specifically for machine learning tasks. This includes things like video analysis, voice recognition, artificial intelligence, and much more.

In Closing…

While Apple’s take on creating their own chips is welcomed by the technology spectrum, their claim to be better the Intel’s or AMD’s chips is rather premature. This is their first ever solo take at making processors, Intel and AMD have been at it for more than three decades. Apple simply took advantage of the leaps taken by the leaders in OEM chip RnD to take a leap into advancements. As for comparing the M1 chips with Intel’s powerful Intel® Core™ i9–10885H processor, if I may this is not an apple-to-apple comparison, excuse the pun.

Resource allocation in macOS and Windows platforms are completely different. macOS has always boasted of being a lighter OS than Windows. On the brighter side, Windows users have always felt more in control of their OS, being able to get super user access is one privilege.

All in all Apple’s M1 chips was worth the wait into a new generation of hardware that tries to fit the Pandora’s box into one highly integrated chip.

As with all things Apple, being an early adopter is risky. Techradar puts across the potential compatibility issues with the M1 chipset. New hardware takes time to understand long-term firmware/hardware limitations. Iterating into more RnD with the M1 mark II chips will lay the foundation for better ML-centric CPUs all in the hands of the average buyer, especially the AI experts the world over.

The 5nm M1 chips offers a challenge to Intel who are struggling to get off the 10nm spectrum in its semiconductor technologies. Apple have offered a fast processor at a bargain, this is huge.

--

--

Chibili Mugala
Analytics Vidhya

A nerdy data scientist with a passion for explainable artificial intelligence, computer vision & autonomous vehicles. https://linktr.ee/chibili