You will have heard by now about the new Apple M1, its first ARM-based system on a chip (SoC) designed for use as a general processor. Part of a broader plan by Apple to eventually drop the use of Intel microprocessors, the first batch of “Apple Silicon” has started making its way into Mac laptops and desktops.
But will data science tools work on the new platform?
More about Apple Silicon
Before answering that question, it makes sense to first explain the appeal of Apple Silicon. Designed as a powerful platform that runs cool and quiet, the M1 SoC has been widely touted as being faster than its Intel-based predecessors. Moreover, reviews have verified its long-lasting battery life that exceeds 11 hours on the MacBook Air.
Under the hood, the M1 is an 8-core processor built using a cutting-edge 5-nanometer process, where four high-performance cores work alongside four low-power cores for less computationally intensive tasks. System memory, a 16-core neural engine, and 8-core GPU are also built into the SoC.
The Rosetta 2 translation layer in macOS Big Sur is the magic that makes Apple Silicon feasible. Instead of forcing developers to recompile their apps, Big Sur will automatically generate optimized code for x86 apps when run for the first time. While this might mean a one-time delay of up to 20 seconds, all features are supported and subsequent app launches are comparable to typical app load times.
Data science tools tested
But with the emulation used, is the Apple M1 suited to perform existing machine learning and data science tasks? In a Medium post, Tommy Shrove, a chief software officer, proceeded to test it with various tools commonly used by data scientists after receiving his MacBook Pro a week ago.
Shrove’s experiences can be summed up as such:
DevOps engineers will want to note that Docker does not yet work. According to a blog post by Docker’s Principal Product Manager Ben De St Paer-Gotch last month, the lack of support is because Docker Desktop relies on a virtual machine internally. This would have to be ported over to Apple’s new hypervisor framework, which will probably take a while to do.
“We also need to do all the plumbing that provides the core experience of Docker Desktop, allowing you to docker run from your terminal as you can today… we [also] have technical dependencies upstream of us that need to make changes prior to making a new version of Docker Desktop GA,” he explained.
Apple M1 for Data Scientists
To be clear, your mileage with Apple Silicon will vary depending on the exact tools used. Since it is still early days yet, some installation issues and performance issues have been reported – you can read another account here. But given that it has been less than a month since the first laptops have landed, the compatibility is encouraging.
The future looks bright, with the single-core performance of the Apple M1 reportedly beating the single-core score of the 2020 27-inch Core i9 iMac's. Given that most data preprocessing libraries don’t take advantage of multiple cores anyway, this makes Apple M1 MacBook laptops a great choice for data scientsts.
Finally, the Unified Memory Architecture implemented by Apple Silicon eliminates memory transfers between CPU, GPU, and Neural Engine. This should increase performance due to the lack of latency and help it pull further ahead of Intel architectures.
And we have not even started talking about the potential of the Neural Engine and relatively powerful GPU for machine learning.
“When you [combine] that speed with integrated memory (reduced latency) and 20 hours of battery life, that could be a game-changer for data scientists on the go,” summed up Shrove.
Image credit: iStockphoto/Rost-9D