Hardware interview practice
Tile-level performance model
Eight identical accelerator tiles each provide 2 TOPS, and the shared memory system supplies 256 GB/s. Compute and memory transfer overlap perfectly. Build the model and calculate execution time and the limiting resource for three workloads.
Starting point
Question code
compute_time = operations / 16e12
memory_time = bytes / 256e9
execution_time = max(compute_time, memory_time)Reviewed example
Work through one case
Input
Workload B: 8e12 operations and 512e9 bytesExpected output
compute_time=0.5 s, memory_time=2.0 s, execution_time=2.0 s, MEMORY-limitedAt 16 TOPS the compute work takes 0.5 seconds; at 256 GB/s the bytes take 2 seconds, and perfect overlap leaves the larger time.
What to cover
Requirements
- Use decimal TOPS and GB/s and assume all eight tiles are available to every workload.
- Calculate compute and memory time separately, then use their maximum because they overlap perfectly.
- Classify compute-limited when compute time is larger, memory-limited when memory time is larger, and balanced when equal.
- Evaluate A=(32e12 ops,256e9 bytes), B=(8e12 ops,512e9 bytes), and C=(16e12 ops,256e9 bytes).
