Page 205 - Handout of Computer Architecture (1)..
P. 205

•  The processor doesn't wait for the first addition to "finish" before starting the next; it
                       creates a continuous flow of results.

               7.11.3. Vector Length and Stride


                   •  Vector Length: Defines how many elements are in the current operation.
                   •  Stride: This is crucial. It defines the memory "step." If your data isn't sitting side-by-side
                       in memory, the processor uses the stride to jump and grab the right pieces.




                Feature              Scalar Processor (SISD)     Vector Processor (SIMD)



                Instruction Count  High (loops are needed)       Low (one instruction per vector)



                Data Handling        One by one                  Parallel/En masse



                Complexity           Simple control logic        Complex memory/bandwidth management



                Best For             General tasks (OS, Office)  Heavy Math (Physics, AI, Graphics)


               7.12 Why does it matter today?


               You might think Vector Processors are "old school" (like the famous Cray-1 supercomputer),
               but they are actually more relevant than ever:


                   1.  GPUs: Your Nvidia or AMD graphics card is essentially a massive collection of vector
                       processors.
                   2.  Instruction Extensions: Modern Intel/AMD CPUs use AVX-512 (Advanced Vector
                       Extensions), which allows your home computer to act like a mini-vector machine for
                       video editing or gaming.
                   3.  Machine Learning: Training a model involves billions of vector-matrix multiplications.
                       Without vector computation, ChatGPT or Midjourney would take years to generate a
                       single response.


               7.12.1 Deep Dive: Vectorization

               The process of taking a "Loop" in C++ or Python and turning it into a single Vector instruction is
               called Vectorization. Most modern compilers try to do this automatically to save time.





                                                             205
   200   201   202   203   204   205   206   207   208