TensorFlow 2.4 can use GPU for machine learning training on MacBook Pro/Mac Pro

Tian Haili @ CSDN 2020-11-21

Previously, TensorFlow on MacBook could only use CPU for training. TF2.4 can use GPU for training, and it supports both M1 MacBook Pro, Intel-based MacBook Pro or Mac Pro. Apple disclosed this information and published performance comparison data .

 

GPU training on MacBook Pro

Look at the performance data below to compare the CPU data, Intel-based MacBook Pro and M1-based MacBook Pro:

Shows a chart that compares three models. One that uses half a million utterances, another that uses one million utterances, and a third that uses five million utterances. The accuracy increases with the number of utterances. The three accuracies are 99 point forty six percent, 99 point 62 percent, and 99 point 85 percent.

The results show that the training performance of the M1 architecture is 7 times higher than that of the CPU; the Intel architecture is not so obvious.

The machine and software configuration:

  • The CPU is a Macbook Pro with 13-inch Intel architecture, running TF2.3
  • The GPU accelerated machine of Intel architecture and the GPU accelerated machine of M1 chip run TF2.4 prerelease
  • The configuration of the Intel-based 13-inch Macbook Pro: 1.7GHz 4-core i7 CPU + Intel Iris Plus Graphics 645 GPU + 16GB RAM + 2TB SSD hard drive
  •  The configuration of the 13-inch Macbook Pro with M1 chip: M1 (4-core high-performance + 4-core high-performance CPU + 8-core GPU + 16-core Neural Engine) + 16GB RAM + 256GB SSD hard drive

It's just that there is NPU in M1. Does this use NPU or just GPU? Apple did not disclose too much, and only mentioned GPU between the lines, so keep your attention.

 

GPU training on Mac Pro

The data for CPU and GPU training on Mac Pro is as follows:

Shows a chart that compares three models. One that uses half a million utterances, another that uses one million utterances, and a third that uses five million utterances. The accuracy increases with the number of utterances. The three accuracies are 99 point forty six percent, 99 point 62 percent, and 99 point 85 percent.

It seems that the GPU effect is greatly improved than the CPU.

Of course, Mac Pro only has Intel architecture machines, and the machine and software configuration:

  • CPU data runs TF2.3
  • GPU data runs TF2.4 prerelease
  • Machine configuration: 3.2GHz 16-core Intel Xeon W-based + 32GB memory + AMD Radeon Pro Vega II Duo GPU (64GB HBM2 video memory) + 256GB SSD hard drive

It seems that if you want to use the Intel-based MacBook Pro to run machine learning training tasks, the improvement is limited; use M1 MacBook Pro or Mac Pro to run machine learning training tasks.

 


[ Source Reference ]

Leveraging ML Compute for Accelerated Training on Mac https://machinelearning.apple.com/updates/ml-compute-training-on-mac

Guess you like

Origin blog.csdn.net/thl789/article/details/109911959