Let's say for:
- Image tasks
- Deep RL in high dimensional state space
Artificial Intelligence Stack Exchange is a question and answer site for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment. It only takes a minute to sign up.Sign up to join this community
The answer is it depends.
Are you referring to GPU vs CPU when training, or running inference? When you say CPU is it an x86 CPU or ARM CPU? What algorithms are running?
Let's look at image classification. Suppose you select a Convolutional Neural Network(CNN) as your algorithm. CNN's were created in the 1980s, but only really saw use when GPU's were used. In 2004 K. S. Oh and K. Jung showed that a GPU was 20x faster than a CPU. In 2005 Steinkrau et al showed a 3x speed increase.
Dan Ciresan et al showed in 2010 and 2011 that a GPU can be up to 60 times faster than a CPU. They used the MNIST handwritten digits benchmark. A simple google search of performance CPU vs GPU will result in many papers that show how much faster a GPU is compared to a CPU.
In this paper Eric Lind and Avelin Parnigoso compare the performance differences between a CPU and a GPU using TensorFlow. In their study they used a Core i7-6500 2.5 GHz CPU and an Nvidia GTX 1070 GPU. In their study they used three CNN AlexNet, Text Classifiction, and the Mnist Digit Classification.
Eric and Avelin showed that GPU outperforms CPU when training, and that during inference the GPU can be slower. In their study AlexNet for example ran for 4 000 000ms on a CPU and under 100 000ms on a GPU. That's a 40x difference in training performance. Converting this to cost. Eric and Avelin did not mention how much RAM.
I am going to make some assumptions and select the following instance types from AWS for training:
Based on this GPU Accelerated will run at less than 100 000ms or 100s while non GPU accelerated will run at 4 000 000ms or 4 000s. The result is:
Based on the experiments showed by Eric and Avelin the CPU instance must be 40x less in cost to be on par with a GPU instance. As you can see the standard CPU is 20 and 40 times more expensive than the GPU. The thought experiment above is based on the paper times for training, not inference, and naturally to get a better answer should be benchmarked.
However, AWS has released their own ARM based CPU's designed specifically for training, and inference.
Both the Inferentia and Trainium chips offer 30% higher throughput and 45% lower cost per inference than Amazon EC2 G4.