Compatibility

The compatibility description applies only to the compatibility porting guide for Ascend C operator development. For details about the overall compatibility policies, see Table 1. The compatibility scope does not include built-in APIs of the compiler and internal APIs of Ascend C. The compatibility described in this document is classified into two types. One is function compatibility, which includes data type compatibility, API prototype compatibility, and constant compatibility. The other is performance compatibility, which means that the time required for executing an API in the new architecture is not longer than that in the old architecture for the same data amount.

If you want to run a 220x-architecture Ascend C program in the 351x architecture, you need to recompile and run the program in the 351x architecture, and may need to adjust the code according to the porting guide.

Figure 1 Ascend C API hierarchy
Table 1 Ascend C API compatibility policies

API Level

Compatibility Policy

High-level API

High-level APIs are compatible with all architectures.

Basic API

Basic APIs are classified into compatible APIs and ISASI APIs. Compatible APIs are compatible with all architectures. ISASI APIs, such as the compute APIs LoadData and Mmad on the Cube, are architecture-related APIs and their compatibility across architecture versions is not guaranteed.

Framework API

Framework APIs are implemented through software and compatible across architecture versions.

Compiler built-in API

Compatibility is not guaranteed.