AI Hardware & Software Stack

What do AI compilers such as XLA, TVM or PyTorch's compile feature mainly do?

  1. ATranslate an AI model's answers into human language
  2. BAutomatically collect training data
  3. CAnalyze the model's computational graph, optimize fusion, data layout and tiling, and generate code for the target hardware
Show answer and explanation

Answer: C. Analyze the model's computational graph, optimize fusion, data layout and tiling, and generate code for the target hardware

An AI compiler takes the model as a computational graph of operations and data flows, fuses operations where possible, removes unnecessary computation, chooses memory layouts and tunes tile sizes, then generates kernels suited to the target, such as a GPU or NPU. It automatically produces optimized code for each hardware target from the same model, greatly reducing manual optimization work.

  • A. It has nothing to do with natural-language translation.
  • B. They do not collect data.
  • C. Correct. They exist to extract hardware performance.