GPU Programming
How does the GPU SIMT (single instruction, multiple threads) model differ from CPU SIMD instructions?
- ASIMT applies many instructions to one datum; SIMD applies one instruction to one datum
- BSIMT and SIMD are exactly the same with different names
- CIn SIMT each thread can be written as an independent program and the hardware handles branches; with SIMD the programmer or compiler explicitly uses fixed-width vector instructions
Show answer and explanation
Answer: C. In SIMT each thread can be written as an independent program and the hardware handles branches; with SIMD the programmer or compiler explicitly uses fixed-width vector instructions
CPU SIMD applies one instruction to a vector register holding 4 or 8 data items, so programs are written with the vector width in mind. With GPU SIMT the programmer writes ordinary code for a single thread, and the hardware bundles 32 threads to execute in lockstep. Threads may branch differently; the hardware executes the divergent paths one after another, though efficiency drops when it does.
- A. Both apply one instruction to multiple data.
- B. They differ in programming model and branch handling.
- C. Correct. Execution is lockstep inside, but the programming model differs.