Australia markets closed
  • ALL ORDS

    6,865.30
    +18.00 (+0.26%)
     
  • ASX 200

    6,634.10
    +18.80 (+0.28%)
     
  • AUD/USD

    0.7427
    -0.0013 (-0.17%)
     
  • OIL

    46.09
    +0.45 (+0.99%)
     
  • GOLD

    1,842.00
    +0.90 (+0.05%)
     
  • BTC-AUD

    25,298.89
    -50.96 (-0.20%)
     
  • CMC Crypto 200

    365.19
    -14.05 (-3.71%)
     
  • AUD/EUR

    0.6123
    +0.0001 (+0.02%)
     
  • AUD/NZD

    1.0529
    +0.0018 (+0.17%)
     
  • NZX 50

    12,631.38
    -17.53 (-0.14%)
     
  • NASDAQ

    12,528.48
    +61.35 (+0.49%)
     
  • FTSE

    6,550.23
    +59.96 (+0.92%)
     
  • Dow Jones

    30,218.26
    +248.74 (+0.83%)
     
  • DAX

    13,298.96
    +46.10 (+0.35%)
     
  • Hang Seng

    26,835.92
    +107.42 (+0.40%)
     
  • NIKKEI 225

    26,751.24
    -58.13 (-0.22%)
     

Mac-optimized TensorFlow flexes new M1 and GPU muscles

Devin Coldewey
·2-min read

A new Mac-optimized fork of machine learning environment TensorFlow posts some major performance increases. Although a big part of that is that until now the GPU wasn't used for training tasks (!), M1-based devices see even further gains, suggesting a spate of popular workflow optimizations like this one are incoming.

Announced on both TensorFlow and Apple's blogs, the improved Mac version shows in the best case more than a 10x improvement in speed for common training tasks.

That's worth celebrating on its own for anyone who works in ML and finds themselves constantly waiting for their models to bake. But the fact that previous versions of TF only utilized the CPU on Macs and not the powerful parallel processors in the GPU probably limited the pool of people who inflict that problem on themselves in the first place. (Most large-scale ML training is done using cloud computing.)

The change from CPU-only to CPU+GPU could account for a great deal of the improvement, as the benchmarks on an Intel-based Mac Pro show huge gains on the same hardware. Training times once in the 6-8 second range are now measured in fractions of a second.

That's not to say the M1 isn't capable, but the new M1 Macs also have new GPUs, meaning the jump from nearly 10 seconds for a task on a 2019 MacBook Pro to less than 2 on a new M1 machine can only be partly attributed to Apple's fancy first-party silicon.

I contacted Apple for more information, such as a number for an M1 device running non-optimized code (which would elucidate the improvements nicely) but a representative said it does not have those numbers.

At any rate perhaps more important for developers will be the improved battery life and heat management of the M1 devices. Performance bumps are all well and good, but if it made your machine into a hot plate, blasted your fan and made you run for the outlet in under an hour — not so good. Fortunately the M1 seems to be demonstrating remarkable efficiency under load, neither draining its reserves or heating up too much.

You can probably expect a lot of these "now works better on M1" stories now that the new Macs are out and all the major companies can ship the updates they've been sitting on for the last few months.