Vector and Array Processing
1
krraju.in
2
Parallel Processing, Pipelining, Arithmetic and Instruction Pipelines, RISK Pipeline, Vector Processing, Array Processors, Multiprocessors, Interconnection structures, Cache coherence.
Unit-5
What you’ll learn
krraju.in
SIMD Computers
Parallel computers appear as either SIMD or MIMD configurations.
Advantages:
3
krraju.in
Vector Processing Application Areas
4
krraju.in
Vector
Scalar (1 operation)
add r3, r1, r2
Vector (n operations)
add.vv v3, v1, v2
Vector length
5
for (i=0; i ≤ 100; i++) C(i) = A(i) + B(i) |
r1
+
r2
r3
v1
+
v2
v3
v1
+
v2
v3
v1
+
v2
v3
v1
+
v2
v3
v1
+
v2
v3
Vector processors have high-level operations that work on linear arrays of numbers
krraju.in
Basic Requirements for Vector Processing
6
krraju.in
Vector Processing
Instructions operate on vectors rather than scalar (single data) values. A vector instruction performs an operation on each element in consecutive cycles.
7
Stride: Distance separating elements that are to be merged into a single vector
krraju.in
Vector Processor
A single processor element operates in sequence on many data elements.
8
krraju.in
Vector Instruction
9
Vector length
Opcode
Base Address Source1
Base Address Source2
Base Address Destination
Instruction Format
Vector instruction includes the initial address of the operands, the length of the vectors, and the operation to be performed.
Fortran | |
| DO 20 I = 1,100 |
20 | C(I) = A(I) + B(I) |
Machine Language | |
| Initialize I = 0 |
20 | Read A(I) |
| Read B(I) |
| Store C(I) = A(I) + B(I) |
| Increment I = I+1 |
| If I ≤ 100 go to 20 |
| Continue |
Single Vector Instruction | |
C(1:100) = A(1:100) + B(1:100) |
krraju.in
Vector Processor
10
krraju.in
Vector Processing
Advantages
11
krraju.in
Vector Processing
Disadvantages
Limitations
Memory (bandwidth) can easily become a bottleneck, especially if
12
krraju.in
Vector vs Array Processors
Array Processor
PE0
Same Ops
@ Same Time
PE1
PE2
PE3
LD0
LD1
LD2
LD3
AD0
AD1
AD2
AD3
MU0
MU1
MU2
MU3
ST0
ST1
ST2
ST3
Different Ops
@ Same Space
Processing Elements
Vector Processor
LD
Different Ops
@ Same Time
AD
MU
ST
LD0
LD1
AD0
LD2
AD1
MU0
LD3
AD2
MU1
ST0
Same Ops
@ Same Space
Functional Units
AD3
MU2
ST1
MU3
ST2
ST3
13
Instruction Stream
LD VR ← A[3:0]
ADD VR ← VR,1
MUL VR ← VR,2
ST A[3:0] ← VR
krraju.in
Array Processors
A synchronous array of parallel processors is called an array processor. They have many processor elements operating in parallel on many data elements.
14
krraju.in
Array Processors
15
Array processors perform computations on a vast array of data. They execute one instruction at a time on an array of data.
krraju.in
Attached Array Processor
16
General-purpose Computer
I/O Interface
Attached array Processor
Local Memory
Main Memory
High-speed memory-to-memory bus
krraju.in
SIMD Array Processors
17
The processing units are designed to work together under the supervision of a single control unit, resulting in a single instruction stream and multiple data streams.
Only good for numerical issues that can be stated as vectors or matrices;
krraju.in
SIMD Array Processor
18
Master Control Unit
M1
Main Memory
PE1
M2
PE2
M3
PE3
Mn
PEn
krraju.in
Usage of Array Processors
19
krraju.in
Recap
20
ILLIAC IV
- first massively parallel computer.
Vector and array processors are both designed for vector computations, but they differ in how they process data.
krraju.in