[ELI5] Why is SIMD still important to include in a CPU. When GPUs exist and serve the exact same purpose?

361 viewsOtherTechnology

SIMD to my understanding is supposed to accelerate 3D Processing and other multimedia processing. GPUs do the exact same thing but instead they’re dedicated into doing that role. I heard SIMD is an early attempt to make 3D Processing possible on CPUs

“GPU is a compute device which implements a SIMD (Single Instruction Multiple Data) in a much more multi-threaded fashoin, in fact SIMD is coined as SIMT (Single Instruction, Multiple Thread) in a GPU. So basically GPU is a an extension of the SIMD paradigm with large scale multi-threading, streaming memory and dynamic scheduling”

-Gary Cole, Quora

Unless I’m wrong. And there are many other things SIMD can be useful for other than Multimedia use and can help with traditional CPU tasks like integer operations but I have not found any info of SIMD being used outside of Multimedia use. It could do operations related to Audio which is very handy but couldn’t they instead be handled by a Digital Signal Processing?

My understanding of computer science is limited so I may gather a ton of knowledge to learn with this post

In: Technology

5 Answers

Anonymous 0 Comments

Communicating with a GPU and running programs on it entials a lot of latency. Just running a GPU program that does nothing takes around 10 microseconds, which is a decent length of time when you consider that we’re talking about devices that run through a few billion cycles per second. That’s more than 30,000 CPU cycles just for a GPU program that does nothing! That’s not even counting the actual communication with the CPU to dispatch the work and then read the results back.

SIMD instructions have very little overhead by comparison since it’s not fundamentally different from executing other CPU instructions. Yes, these instructions are often longer and heavier, but when the throughput gain can be 2, 4, 8, 16, 32, or even 64 times what you get when not using SIMD, this increased overhead easily gets drowned out. This makes SIMD very useful for solving problems that have parallism at a very small scale where GPU programming, or even multithreading might not lead to a performance increase.

As far as this bit:

> Unless I’m wrong. And there are many other things SIMD can be useful for other than Multimedia use and can help with traditional CPU tasks like integer operations but I have not found any info of SIMD being used outside of Multimedia use.

SIMD can totally be used for purposes beyond multimedia applications, and more modern SIMD instructions sets are increasingly being designed for general-purpose computing and for specific applications like machine learning and cryptography. In fact, I have a hobby project that is all about facilitating the use of SIMD instructions for general-purpose tasks. I’m very often able to get substantial improvements in performance by using them for tasks that they normally aren’t used for. e.g I recently made some functions that can compute the remainders of division for floating-point numbers at a throughput that is ~200 times greater than non-SIMD code.

You are viewing 1 out of 5 answers, click here to view all answers.