Heterogeneous Compilation Overview

The Ascend AI processor uses the Host + Device heterogeneous architecture:

  • Host: runs on a general-purpose CPU (x86 or AArch64) and is responsible for device initialization, memory allocation, data movement, kernel scheduling, and result collection. The host code interacts with the device through CANN Runtime APIs (such as aclInit, aclrtMalloc, and aclrtMemcpy).
  • Device: runs on the Ascend AI processor and is responsible for computation. The device code is implemented as kernel functions and launched asynchronously from the host using the <<<>>> syntax
    • AI Core: AI Core device code. AI Core is the computing core of AI processor. It provides Cube and Vector computing capabilities.
    • AI CPU: AI CPU device code. AI CPU is a processor based on the AArch64 architecture. It is usually used as a supplement to AI Core and is responsible for non-matrix and selection-intensive computation with complex logic.

The core capability of BiSheng Compiler is to identify, compile, and link host and device code into binary products that can run in the target environment.