AI Hardware & Software Stack
What is the main purpose of operator fusion in AI computation?
- ATo combine several operations into one kernel, avoiding writing intermediate results to memory and reading them back
- BTo merge two AI models into one for higher accuracy
- CTo physically fuse arithmetic units together
Show answer and explanation
Answer: A. To combine several operations into one kernel, avoiding writing intermediate results to memory and reading them back
A matrix product is often followed by element-wise operations such as adding a bias, an activation function and normalization. Doing each in a separate kernel means writing intermediate results to memory and reading them back every time, which takes longer than the computation. Combining them into one kernel lets the intermediate values stay in registers or on-chip memory throughout.
- A. Correct. It especially helps memory-bound operations.
- B. It is not about merging models.
- C. It is not physical processing.