Configuring the Cross-Compilation Environment
If the OS architecture in the development environment differs from that in the runtime environment, you must use a cross-compilation tool in the development environment and compile using library files corresponding to the runtime architecture. This ensures that the generated executable files can run properly in the runtime environment.
For example, if the runtime environment is an edge device and you are using an x86 server (or PC) to build the development environment, you must use a cross-compilation tool and aarch64-architecture library files for compilation.
Currently, compilation is supported using either the cross-compilation tools provided in the CANN Toolkit package or the g++ cross-compilers supported on Linux. For supported OSs (e.g., openEuler, Ubuntu), you can directly use the cross-compilation tools bundled with the CANN Toolkit package. For unsupported OSs and other Ascend AI Processors, you must manually install the appropriate g++ cross-compiler. For details, see Table 1.
Development Environment Architecture |
Operating Environment Architecture |
Compilation Environment Configuration |
|---|---|---|
x86_64 |
AArch64 |
|