Are SIMD and VLIW instructions the same thing?

2.2k views Asked by At

What exactly is the difference between SIMD (Single Instruction Multiple Data) and VLIW (Very Long Instruction Word)? Is one a subset of the other? Or are they two completely difference things?

1

There are 1 answers

0
Peter Cordes On BEST ANSWER

Completely unrelated, and orthogonal. A machine can have one or both, or neither. SIMD instructions could be added to a VLIW ISA as an extension. (But VLIW is baked in to the machine-code format and ISA.)

VLIW is multiple instructions in one block to be decoded together, and executed without checking for hazards / dependencies between them: the compiler is required to do that, so the VLIW idea is to offload some of that work of finding instruction-level parallelism (ILP) to the compiler.
One of the most well-known examples is Intel/HP's Itanium ISA. https://www.realworldtech.com/mckinley/ covers some details about it, and the first-gen Merced microarchitecture (which wasn't very good). https://www.realworldtech.com/ev8-mckinley/5/ has more details about the 2nd-gen microarchitecture, McKinley.

VLIW is one way to provide some MIMD capability (multiple instructions on multiple data, doing different things to different data.)

SIMD is one instruction doing the same thing to multiple elements of data, so getting more work per clock through the CPU pipeline only involves widening the execution units, not the whole pipeline. (Single Instruction, Multiple Data.) A problem with lots of data parallelism can expose that to the CPU in the form of SIMD, ILP, and thread-level parallelism, all at the same time.

(e.g. a matrix multiply or dot product which uses multiple accumulators to create separate dependency chains (ILP), where each accumulator is a vector of 4, 8, or 16 floats (SIMD). And you can divide that work up across cores, so you can get e.g. 2x 8 FMAs per clock per core on Skylake or Zen2.)